From e2ac615cb20adddd588aa73733ce38fd0deef609 Mon Sep 17 00:00:00 2001 From: Nicholas Sharp Date: Wed, 21 Jul 2021 14:57:49 -0400 Subject: [PATCH] make C++11 requirement public, so it propagates; avoid extensions --- src/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fe28a10f..962c357a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -147,8 +147,11 @@ target_include_directories(geometry-central PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/ target_link_libraries(geometry-central PUBLIC ${GC_DEP_LIBS}) # Set compiler properties for the library -set_property(TARGET geometry-central PROPERTY CXX_STANDARD 11) -set_property(TARGET geometry-central PROPERTY CXX_STANDARD_REQUIRED TRUE) +target_compile_features(geometry-central PUBLIC cxx_std_11) +set_target_properties(geometry-central PROPERTIES + CXX_STANDARD_REQUIRED TRUE + CXX_EXTENSIONS OFF +) target_compile_definitions(geometry-central PUBLIC NOMINMAX _USE_MATH_DEFINES) # Define CMAKE flag used in these sources (but should be kept OUT of headers)