mirror of
https://github.com/jbeder/yaml-cpp.git
synced 2025-09-08 12:21:17 +00:00
Minimize warnings when not the top-level project (#1124)
Minimize warnings when not the top-level project Should fix #970 and #764 when trying to add yaml-cpp to other project
This commit is contained in:
@@ -106,11 +106,15 @@ if (NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
CXX_STANDARD 11)
|
||||
endif()
|
||||
|
||||
if(YAML_CPP_MAIN_PROJECT)
|
||||
target_compile_options(yaml-cpp
|
||||
PRIVATE
|
||||
$<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>
|
||||
$<${not-msvc}:-pedantic -pedantic-errors>)
|
||||
endif()
|
||||
|
||||
target_compile_options(yaml-cpp
|
||||
PRIVATE
|
||||
$<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long>
|
||||
$<${not-msvc}:-pedantic -pedantic-errors>
|
||||
|
||||
$<$<AND:${backport-msvc-runtime},${msvc-rt-mtd-static}>:-MTd>
|
||||
$<$<AND:${backport-msvc-runtime},${msvc-rt-mt-static}>:-MT>
|
||||
$<$<AND:${backport-msvc-runtime},${msvc-rt-mtd-dll}>:-MDd>
|
||||
|
Reference in New Issue
Block a user