diff options
author | Jan Niklas Hasse <jhasse@bixense.com> | 2020-01-16 14:57:23 (GMT) |
---|---|---|
committer | Jan Niklas Hasse <jhasse@bixense.com> | 2020-01-17 22:38:12 (GMT) |
commit | f2cf7a45c062a9c35bb3f436f56ab0c28fbe6680 (patch) | |
tree | c1a1b36aba821ffdd2e88b8e2c26df1ba285b726 /CMakeLists.txt | |
parent | dfd4c4e37020f083be9c9408b20e61fd51f94979 (diff) | |
download | Ninja-f2cf7a45c062a9c35bb3f436f56ab0c28fbe6680.zip Ninja-f2cf7a45c062a9c35bb3f436f56ab0c28fbe6680.tar.gz Ninja-f2cf7a45c062a9c35bb3f436f56ab0c28fbe6680.tar.bz2 |
CMake: Use static MSVC runtime, fixes #1692
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e9f6563..60fd8a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,5 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) +cmake_policy(SET CMP0091 NEW) project(ninja) if(CMAKE_BUILD_TYPE MATCHES "Release") @@ -15,6 +16,7 @@ if(CMAKE_BUILD_TYPE MATCHES "Release") endif() if(MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4 /GR- /Zc:__cplusplus") else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fdiagnostics-color") |