mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-09 04:41:16 +00:00
Set C++ standard options in CMake per-target instead of globally (#735)
Setting CMAKE_CXX_STANDARD and CMAKE_CXX_STANDARD_REQUIRED directly is problematic when including yaml-cpp as a subproject. The proper way is to set these per-target.
This commit is contained in:

committed by
Jesse Beder

parent
90350662c9
commit
d638508d33
@@ -51,6 +51,11 @@ add_executable(run-tests
|
||||
${test_headers}
|
||||
)
|
||||
|
||||
set_target_properties(run-tests PROPERTIES
|
||||
CXX_STANDARD 11
|
||||
CXX_STANDARD_REQUIRED ON
|
||||
)
|
||||
|
||||
add_dependencies(run-tests googletest_project)
|
||||
|
||||
set_target_properties(run-tests PROPERTIES
|
||||
|
Reference in New Issue
Block a user