Skip to content

Commit

Permalink
Enable CMP0091 to use MSVC_RUNTIME_LIBRARY (#913)
Browse files Browse the repository at this point in the history
Per https://cmake.org/cmake/help/latest/policy/CMP0091.html, we need to
enable policy CMP0091 if we want to make use of MSVC_RUNTIME_LIBRARY
and/or CMAKE_MSVC_RUNTIME_LIBRARY.  Fixes issue #912.
  • Loading branch information
tomlogic authored Jul 8, 2020
1 parent 6d5cfab commit 370acee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# 3.5 is actually available almost everywhere, but this a good minimum
cmake_minimum_required(VERSION 3.4)

# enable MSVC_RUNTIME_LIBRARY target property
# see https://cmake.org/cmake/help/latest/policy/CMP0091.html
if(POLICY CMP0091)
cmake_policy(SET CMP0091 NEW)
endif()

project(YAML_CPP VERSION 0.6.3 LANGUAGES CXX)

include(CMakePackageConfigHelpers)
Expand Down

0 comments on commit 370acee

Please sign in to comment.