From f1fbd707f1491b298ad20af0b5be7ca85f65182b Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Sat, 7 Aug 2021 09:57:21 -0700 Subject: [PATCH] Set CMP0091 CMake policy This allows the correct use of runtime library override. Fixes #412 --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index db2f10e..cdb8c21 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,11 @@ option(PUGIXML_NO_STL "Disable STL" OFF) option(PUGIXML_NO_EXCEPTIONS "Disable Exceptions" OFF) mark_as_advanced(PUGIXML_NO_XPATH PUGIXML_NO_STL PUGIXML_NO_EXCEPTIONS) +# Policy configuration +if(POLICY CMP0091) + cmake_policy(SET CMP0091 NEW) # Enables use of MSVC_RUNTIME_LIBRARY +endif() + set(PUGIXML_PUBLIC_DEFINITIONS $<$:PUGIXML_WCHAR_MODE> $<$:PUGIXML_COMPACT>