CMake: enable CMP0091, fixes lack of /MD flag with Ninja+clang-cl

This commit is contained in:
rdb 2020-04-13 13:19:12 +02:00
parent ffed048c3e
commit 2cb8f69f61

View File

@ -14,6 +14,11 @@ if(CMAKE_VERSION VERSION_GREATER "3.12" OR POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
if(POLICY CMP0091)
# Needed for CMake to pass /MD flag properly with non-VC generators.
cmake_policy(SET CMP0091 NEW)
endif()
# Figure out the version
set(_s "[\\t ]*") # CMake doesn't support \s*
file(STRINGS "setup.cfg" _version REGEX "^version${_s}=${_s}")