diff --git a/CMakeLists.txt b/CMakeLists.txt index 063fa5b..e1de577 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,19 +54,15 @@ endif() file(GLOB yaml-cpp-contrib-sources ${contrib-pattern}) file(GLOB yaml-cpp-sources ${src-pattern}) -# /wd4127 = disable warning C4127 "conditional expression is constant" -# http://msdn.microsoft.com/en-us/library/6t66728h.aspx -# /wd4355 = disable warning C4355 "'this' : used in base member initializer list -# http://msdn.microsoft.com/en-us/library/3c594ae3.aspx set(msvc-rt $) -set(mtd-static $) -set(mt-static $) +set(msvc-rt-mtd-static $) +set(msvc-rt-mt-static $) -set(mtd-dll $) -set(mt-dll $) +set(msvc-rt-mtd-dll $) +set(msvc-rt-mt-dll $) -set(backport $) +set(backport-msvc-runtime $) add_library(yaml-cpp ${yaml-cpp-type}) add_library(yaml::yaml ALIAS yaml-cpp) @@ -96,11 +92,15 @@ target_compile_options(yaml-cpp $<${not-msvc}:-Wall -Wextra -Wshadow -Weffc++ -Wno-long-long> $<${not-msvc}:-pedantic -pedantic-errors> - $<$:-MTd> - $<$:-MT> - $<$:-MDd> - $<$:-MD> - + $<$:-MTd> + $<$:-MT> + $<$:-MDd> + $<$:-MD> + + # /wd4127 = disable warning C4127 "conditional expression is constant" + # http://msdn.microsoft.com/en-us/library/6t66728h.aspx + # /wd4355 = disable warning C4355 "'this' : used in base member initializer list + # http://msdn.microsoft.com/en-us/library/3c594ae3.aspx $<$:/W3 /wd4127 /wd4355>) target_compile_definitions(yaml-cpp