[Cmake-commits] CMake branch, next, updated. v3.3.1-2278-g907ea3b
Brad King
brad.king at kitware.com
Thu Aug 20 09:37:15 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 907ea3b6ed95b9ae3648868b77d744e82330fd9a (commit)
via dc8822f0a7b4152c5cb880e6a7fccada767e2fb1 (commit)
from 24c06319347e706c83422af382a72a9f82b47eff (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=907ea3b6ed95b9ae3648868b77d744e82330fd9a
commit 907ea3b6ed95b9ae3648868b77d744e82330fd9a
Merge: 24c0631 dc8822f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Aug 20 09:37:14 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Aug 20 09:37:14 2015 -0400
Merge topic 'determine-compiler-CMP0054' into next
dc8822f0 CMakeDetermine{C,CXX}Compiler: Avoid if() auto-dereferene in quoted arguments
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dc8822f0a7b4152c5cb880e6a7fccada767e2fb1
commit dc8822f0a7b4152c5cb880e6a7fccada767e2fb1
Author: Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Wed Aug 19 22:40:38 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Aug 20 09:35:16 2015 -0400
CMakeDetermine{C,CXX}Compiler: Avoid if() auto-dereferene in quoted arguments
Exposed by a CMP0054 warning with code like:
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
project(MyProj NONE)
enable_language(C)
enable_language(CXX)
While at it, use STREQUAL for testing the compiler id against "GNU".
Suggested-by: Rolf Eike Beer <eike at sf-mail.de>
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 937aa8c..db477cb 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -95,6 +95,7 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
# Try to identify the compiler.
set(CMAKE_C_COMPILER_ID)
+ set(CMAKE_C_PLATFORM_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_C_COMPILER_ID_PLATFORM_CONTENT)
@@ -108,12 +109,12 @@ if(NOT CMAKE_C_COMPILER_ID_RUN)
CMAKE_DETERMINE_COMPILER_ID(C CFLAGS CMakeCCompilerId.c)
# Set old compiler and platform id variables.
- if(CMAKE_C_COMPILER_ID MATCHES "GNU")
+ if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
set(CMAKE_COMPILER_IS_GNUCC 1)
endif()
- if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW")
+ if(CMAKE_C_PLATFORM_ID MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
- elseif("${CMAKE_C_PLATFORM_ID}" MATCHES "Cygwin")
+ elseif(CMAKE_C_PLATFORM_ID MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif()
endif()
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 893c454..18e735b 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -90,6 +90,7 @@ if(NOT CMAKE_CXX_COMPILER_ID_RUN)
# Try to identify the compiler.
set(CMAKE_CXX_COMPILER_ID)
+ set(CMAKE_CXX_PLATFORM_ID)
file(READ ${CMAKE_ROOT}/Modules/CMakePlatformId.h.in
CMAKE_CXX_COMPILER_ID_PLATFORM_CONTENT)
@@ -103,12 +104,12 @@ 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")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_COMPILER_IS_GNUCXX 1)
endif()
- if("${CMAKE_CXX_PLATFORM_ID}" MATCHES "MinGW")
+ if(CMAKE_CXX_PLATFORM_ID MATCHES "MinGW")
set(CMAKE_COMPILER_IS_MINGW 1)
- elseif("${CMAKE_CXX_PLATFORM_ID}" MATCHES "Cygwin")
+ elseif(CMAKE_CXX_PLATFORM_ID MATCHES "Cygwin")
set(CMAKE_COMPILER_IS_CYGWIN 1)
endif()
endif()
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeDetermineCCompiler.cmake | 7 ++++---
Modules/CMakeDetermineCXXCompiler.cmake | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list