Skip to content

Commit db03655

Browse files
Make sure CXX_STANDARD can be overridden from outside (#1239)
1 parent 145eec5 commit db03655

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/cmake/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,7 @@ else()
1515
endif()
1616

1717
add_executable(main main.cpp)
18-
set_target_properties(main PROPERTIES CXX_STANDARD 11)
18+
if (NOT DEFINED CMAKE_CXX_STANDARD)
19+
set_target_properties(main PROPERTIES CXX_STANDARD 11)
20+
endif()
1921
target_link_libraries(main PRIVATE ${YAML_CPP_LIBRARIES})

0 commit comments

Comments
 (0)