From db03655d58c66f31952c772718d0394eac2e5481 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Mon, 23 Oct 2023 14:20:22 +0200 Subject: [PATCH] Make sure CXX_STANDARD can be overridden from outside (#1239) --- test/cmake/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/cmake/CMakeLists.txt b/test/cmake/CMakeLists.txt index 19a7910..a2b8e78 100644 --- a/test/cmake/CMakeLists.txt +++ b/test/cmake/CMakeLists.txt @@ -15,5 +15,7 @@ else() endif() add_executable(main main.cpp) -set_target_properties(main PROPERTIES CXX_STANDARD 11) +if (NOT DEFINED CMAKE_CXX_STANDARD) + set_target_properties(main PROPERTIES CXX_STANDARD 11) +endif() target_link_libraries(main PRIVATE ${YAML_CPP_LIBRARIES})