Skip to content

Commit 370acee

Browse files
authored
Enable CMP0091 to use MSVC_RUNTIME_LIBRARY (jbeder#913)
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 jbeder#912.
1 parent 6d5cfab commit 370acee

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# 3.5 is actually available almost everywhere, but this a good minimum
22
cmake_minimum_required(VERSION 3.4)
3+
4+
# enable MSVC_RUNTIME_LIBRARY target property
5+
# see https://cmake.org/cmake/help/latest/policy/CMP0091.html
6+
if(POLICY CMP0091)
7+
cmake_policy(SET CMP0091 NEW)
8+
endif()
9+
310
project(YAML_CPP VERSION 0.6.3 LANGUAGES CXX)
411

512
include(CMakePackageConfigHelpers)

0 commit comments

Comments
 (0)