Skip to content

Commit

Permalink
test/cmake/CMakeLists.txt: make sure CXX_STANDARD can be overridden f…
Browse files Browse the repository at this point in the history
…rom outside
  • Loading branch information
LocutusOfBorg committed Oct 23, 2023
1 parent 145eec5 commit 76b6ecb
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 76b6ecb

Please sign in to comment.