This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  4892f73d7428fbbe4bd11d4892590ec81eeff56b (commit)
       via  74eef37bc73cc012129ccc9b3a97a0e819c433b9 (commit)
       via  ed54d877894499319d67628b730053484e97049c (commit)
      from  0d356e4c9490a104a02be657936132c080fc023b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4892f73d7428fbbe4bd11d4892590ec81eeff56b
commit 4892f73d7428fbbe4bd11d4892590ec81eeff56b
Merge: 0d356e4 74eef37
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Aug 26 14:00:32 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Aug 26 10:00:46 2019 -0400

    Merge topic 'cmake-msvc-runtime-library'
    
    74eef37bc7 Utilities/Release: Select MSVC runtime library via abstraction
    ed54d87789 Configure CMake itself with policies through CMake 3.15
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3718


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=74eef37bc73cc012129ccc9b3a97a0e819c433b9
commit 74eef37bc73cc012129ccc9b3a97a0e819c433b9
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 14:16:05 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Aug 23 10:55:59 2019 -0400

    Utilities/Release: Select MSVC runtime library via abstraction
    
    Use the `CMAKE_MSVC_RUNTIME_LIBRARY` abstraction added by CMake 3.15
    instead of hard-coding the `-MT` flag.

diff --git a/Utilities/Release/win32_release.cmake 
b/Utilities/Release/win32_release.cmake
index 468e5f4..f0f51b8 100644
--- a/Utilities/Release/win32_release.cmake
+++ b/Utilities/Release/win32_release.cmake
@@ -28,8 +28,7 @@ CMAKE_Fortran_COMPILER:FILEPATH=FALSE
 CMAKE_GENERATOR:INTERNAL=Ninja
 BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
-CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
-CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
+CMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug>
 CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,6.01
 CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=${qt_win_libs}
 CMAKE_PREFIX_PATH:STRING=${qt_prefix}
diff --git a/Utilities/Release/win64_release.cmake 
b/Utilities/Release/win64_release.cmake
index 5a93ce6..149d378 100644
--- a/Utilities/Release/win64_release.cmake
+++ b/Utilities/Release/win64_release.cmake
@@ -28,8 +28,7 @@ CMAKE_Fortran_COMPILER:FILEPATH=FALSE
 CMAKE_GENERATOR:INTERNAL=Ninja
 BUILD_QtDialog:BOOL=TRUE
 CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3
-CMAKE_C_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
-CMAKE_CXX_FLAGS_RELEASE:STRING=-MT -O2 -Ob2 -DNDEBUG
+CMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug>
 CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,6.01
 CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=${qt_win_libs}
 CMAKE_PREFIX_PATH:STRING=${qt_prefix}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed54d877894499319d67628b730053484e97049c
commit ed54d877894499319d67628b730053484e97049c
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Aug 22 14:15:23 2019 -0400
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Fri Aug 23 10:55:58 2019 -0400

    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.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e3d39d..aa8a4c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,24 @@
 # Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
 # file Copyright.txt or https://cmake.org/licensing for details.
 
-cmake_minimum_required(VERSION 3.1...3.14 FATAL_ERROR)
+cmake_minimum_required(VERSION 3.1...3.15 FATAL_ERROR)
 set(CMAKE_USER_MAKE_RULES_OVERRIDE_C 
${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake)
 set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX 
${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake)
 project(CMake)
 unset(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX)
 unset(CMAKE_USER_MAKE_RULES_OVERRIDE_C)
 
+# FIXME: This block should go away after a transition period.
+if(MSVC AND NOT CMAKE_VERSION VERSION_LESS 3.15)
+  # Filter out MSVC runtime library flags that may have come from
+  # the cache of an existing build tree or from scripts.
+  foreach(l C CXX)
+    foreach(c DEBUG MINSIZEREL RELEASE RELWITHDEBINFO)
+      string(REGEX REPLACE "[-/]M[DT]d?( |$)" "" "CMAKE_${l}_FLAGS_${c}" 
"${CMAKE_${l}_FLAGS_${c}}")
+    endforeach()
+  endforeach()
+endif()
+
 # Make sure we can find internal find_package modules only used for
 # building CMake and not for shipping externally
 list(INSERT CMAKE_MODULE_PATH 0 ${CMake_SOURCE_DIR}/Source/Modules)
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)

-----------------------------------------------------------------------

Summary of changes:
 CMakeLists.txt                                    | 13 ++++++++++++-
 Utilities/Doxygen/CMakeLists.txt                  |  2 +-
 Utilities/Release/WiX/CustomAction/CMakeLists.txt | 18 ++++++++++++------
 Utilities/Release/win32_release.cmake             |  3 +--
 Utilities/Release/win64_release.cmake             |  3 +--
 Utilities/Sphinx/CMakeLists.txt                   |  2 +-
 6 files changed, 28 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to