diff options
author | Brad King <brad.king@kitware.com> | 2019-08-22 18:15:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-08-23 14:55:58 (GMT) |
commit | ed54d877894499319d67628b730053484e97049c (patch) | |
tree | c3ed617efd305a6802e4d429cf06c305ceea5dd7 /Utilities | |
parent | 130dbe4a5d49baa4404a399860bd3a6182783ece (diff) | |
download | CMake-ed54d877894499319d67628b730053484e97049c.zip CMake-ed54d877894499319d67628b730053484e97049c.tar.gz CMake-ed54d877894499319d67628b730053484e97049c.tar.bz2 |
Configure CMake itself with policies through CMake 3.15
In particular, set `CMP0091` to `NEW` to enable the MSVC runtime library
abstraction so it can be set via `CMAKE_MSVC_RUNTIME_LIBRARY` in the
cache.
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/Doxygen/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Utilities/Release/WiX/CustomAction/CMakeLists.txt | 18 | ||||
-rw-r--r-- | Utilities/Sphinx/CMakeLists.txt | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/Utilities/Doxygen/CMakeLists.txt b/Utilities/Doxygen/CMakeLists.txt index f52caed..5bf13f3 100644 --- a/Utilities/Doxygen/CMakeLists.txt +++ b/Utilities/Doxygen/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeDeveloperReference_STANDALONE 1) - cmake_minimum_required(VERSION 3.1...3.14 FATAL_ERROR) + cmake_minimum_required(VERSION 3.1...3.15 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) diff --git a/Utilities/Release/WiX/CustomAction/CMakeLists.txt b/Utilities/Release/WiX/CustomAction/CMakeLists.txt index 7efd01e..9d89dd8 100644 --- a/Utilities/Release/WiX/CustomAction/CMakeLists.txt +++ b/Utilities/Release/WiX/CustomAction/CMakeLists.txt @@ -1,9 +1,15 @@ -foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) - string(REPLACE "/MD" "/MT" - "CMAKE_CXX_FLAGS_${CONFIG}" - "${CMAKE_CXX_FLAGS_${CONFIG}}" - ) -endforeach() +if(MSVC) + if(NOT CMAKE_VERSION VERSION_LESS 3.15) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") + else() + foreach(CONFIG DEBUG MINSIZEREL RELEASE RELWITHDEBINFO) + string(REPLACE "/MD" "/MT" + "CMAKE_CXX_FLAGS_${CONFIG}" + "${CMAKE_CXX_FLAGS_${CONFIG}}" + ) + endforeach() + endif() +endif() add_library(CMakeWiXCustomActions MODULE detect_nsis_overwrite.cpp diff --git a/Utilities/Sphinx/CMakeLists.txt b/Utilities/Sphinx/CMakeLists.txt index 736a7c0..17c5018 100644 --- a/Utilities/Sphinx/CMakeLists.txt +++ b/Utilities/Sphinx/CMakeLists.txt @@ -3,7 +3,7 @@ if(NOT CMake_SOURCE_DIR) set(CMakeHelp_STANDALONE 1) - cmake_minimum_required(VERSION 3.1...3.14 FATAL_ERROR) + cmake_minimum_required(VERSION 3.1...3.15 FATAL_ERROR) get_filename_component(tmp "${CMAKE_CURRENT_SOURCE_DIR}" PATH) get_filename_component(CMake_SOURCE_DIR "${tmp}" PATH) include(${CMake_SOURCE_DIR}/Modules/CTestUseLaunchers.cmake) |