Skip to content

Commit

Permalink
Make sure CXX_STANDARD can be overridden from outside (#1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
LocutusOfBorg authored Oct 23, 2023
1 parent 145eec5 commit db03655
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

0 comments on commit db03655

Please sign in to comment.