Skip to content

Commit eb99ea9

Browse files
emmenlaupaceholder
authored andcommitted
CMakeLists.txt: Allow users to override c++ standard
1 parent 63a4c33 commit eb99ea9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ option(NE_FORCE_TEST_COLOR "Force colorized unit test output" OFF)
2424
enable_testing()
2525

2626
if(NE_DEVELOPER_DEFAULTS)
27-
set(CMAKE_CXX_STANDARD 14)
28-
set(CMAKE_CXX_EXTENSIONS OFF)
29-
3027
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
3128
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
3229
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/lib")
@@ -130,7 +127,10 @@ target_compile_options(nodes
130127
$<$<CXX_COMPILER_ID:Clang>:-Wall -Wextra>
131128
)
132129

133-
target_compile_features(nodes PUBLIC cxx_std_14)
130+
if(NE_DEVELOPER_DEFAULTS)
131+
target_compile_features(nodes PUBLIC cxx_std_14)
132+
set_target_properties(nodes PROPERTIES CXX_EXTENSIONS OFF)
133+
endif()
134134

135135
set_target_properties(nodes
136136
PROPERTIES

0 commit comments

Comments
 (0)