# HG changeset patch # User David Demelier # Date 1456387318 -3600 # Node ID 5f50c00a3472cbeb42856984069431c899b36bf2 # Parent 51a817a269c5ccebefbfeffa345a05e431d018ac yaml: fix MSVC 2015 warnings diff -r 51a817a269c5 -r 5f50c00a3472 yaml/CMakeLists.txt --- a/yaml/CMakeLists.txt Thu Feb 25 09:01:50 2016 +0100 +++ b/yaml/CMakeLists.txt Thu Feb 25 09:01:58 2016 +0100 @@ -44,8 +44,14 @@ target_compile_definitions( yaml PRIVATE + YAML_DECLARE_STATIC YAML_VERSION_MAJOR=${YAML_VERSION_MAJOR} YAML_VERSION_MINOR=${YAML_VERSION_MINOR} YAML_VERSION_PATCH=${YAML_VERSION_PATCH} YAML_VERSION_STRING=\"${YAML_VERSION_STRING}\" ) + +if (MSVC) + target_compile_definitions(yaml PUBLIC _CRT_SECURE_NO_WARNINGS) + target_compile_options(yaml PUBLIC /wd4244 /wd4267 /wd4996) +endif ()