diff --git a/CMakeLists.txt b/CMakeLists.txt index 638ced9..f2c3c62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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> - $<$:-MTd> $<$:-MT> $<$:-MDd>