Skip to content

Commit df21535

Browse files
theuniryanofsky
andcommitted
build: don't clobber user/superproject c++ version
This allows a vendored libmultiprocess to inherit the c++ version from the main project Co-authored-by: Ryan Ofsky <[email protected]>
1 parent 07c917f commit df21535

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
cmake_minimum_required(VERSION 3.8)
66

77
project("Libmultiprocess" CXX)
8-
set(CMAKE_CXX_STANDARD 17)
9-
set(CMAKE_CXX_STANDARD_REQUIRED YES)
8+
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
9+
set(CMAKE_CXX_STANDARD 17)
10+
set(CMAKE_CXX_STANDARD_REQUIRED YES)
11+
endif()
1012

1113
include("cmake/compat_find.cmake")
1214

0 commit comments

Comments
 (0)