[Cmake-commits] CMake branch, next, updated. v3.3.1-2269-g80267fb

Matt McCormick matt.mccormick at kitware.com
Wed Aug 19 08:42:13 EDT 2015


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, next has been updated
       via  80267fb9587aec657286305580fee4fc390c3cb9 (commit)
       via  306c9361ce1fffc85b2ffe88132885cf5955f1ba (commit)
      from  a3443d29fec62f29990eda358e1d8dd16cff811c (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=80267fb9587aec657286305580fee4fc390c3cb9
commit 80267fb9587aec657286305580fee4fc390c3cb9
Merge: a3443d2 306c936
Author:     Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Wed Aug 19 08:42:12 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 19 08:42:12 2015 -0400

    Merge topic 'MSVC-quote-for-release' into next
    
    306c9361 CMake: Silence CMP0054 warning with separate project, enable_language calls.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=306c9361ce1fffc85b2ffe88132885cf5955f1ba
commit 306c9361ce1fffc85b2ffe88132885cf5955f1ba
Author:     Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Sun Aug 16 15:42:23 2015 -0400
Commit:     Matt McCormick <matt.mccormick at kitware.com>
CommitDate: Sun Aug 16 15:42:23 2015 -0400

    CMake: Silence CMP0054 warning with separate project, enable_language calls.
    
    This addresses the warning:
    
      -- The CXX compiler identification is MSVC 18.0.31101.0
      CMake Warning (dev) at C:/Program Files (x86)/CMake/share/cmake-3.3/Modules/CMakeDetermineCXXCompiler.cmake:106 (if):
        Policy CMP0054 is not set: Only interpret if() arguments as variables or
        keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
        details.  Use the cmake_policy command to set the policy and suppress this
        warning.
    
        Quoted variables like "MSVC" will no longer be dereferenced when the policy
        is set to NEW.  Since the policy is not set the OLD behavior will be used.
      Call Stack (most recent call first):
        CMakeLists.txt:23 (enable_language)
    
    That occurs with MSVC / Ninja with the following CMakeLists.txt:
    
      cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
      project(MyProj NONE)
      enable_language(C)
      enable_language(CXX)

diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 893c454..7e6d8dc 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -103,14 +103,17 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
   CMAKE_DETERMINE_COMPILER_ID(CXX CXXFLAGS CMakeCXXCompilerId.cpp)
 
   # Set old compiler and platform id variables.
-  if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
-    set(CMAKE_COMPILER_IS_GNUCXX 1)
-  endif()
-  if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
-    set(CMAKE_COMPILER_IS_MINGW 1)
-  elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
-    set(CMAKE_COMPILER_IS_CYGWIN 1)
-  endif()
+  cmake_policy(PUSH)
+    cmake_policy(SET CMP0054 NEW)
+    if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
+      set(CMAKE_COMPILER_IS_GNUCXX 1)
+    endif()
+    if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
+      set(CMAKE_COMPILER_IS_MINGW 1)
+    elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
+      set(CMAKE_COMPILER_IS_CYGWIN 1)
+    endif()
+  cmake_policy(POP)
 endif()
 
 if (NOT _CMAKE_TOOLCHAIN_LOCATION)

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

Summary of changes:
 Modules/CMakeDetermineCXXCompiler.cmake |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list