diff options
author | Brad King <brad.king@kitware.com> | 2015-08-20 13:38:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-20 13:38:37 (GMT) |
commit | 9b8aff285e9d4c4498684664da0c2a9048a32edd (patch) | |
tree | 3279bb2735c38bf3b496eb1f5f489a3f168d167e | |
parent | 4a6fe0290880bd56dd5141f06c9fa2b9e310162e (diff) | |
parent | dc8822f0a7b4152c5cb880e6a7fccada767e2fb1 (diff) | |
download | CMake-9b8aff285e9d4c4498684664da0c2a9048a32edd.zip CMake-9b8aff285e9d4c4498684664da0c2a9048a32edd.tar.gz CMake-9b8aff285e9d4c4498684664da0c2a9048a32edd.tar.bz2 |
Merge branch 'determine-compiler-CMP0054' into release
-rw-r--r-- | Modules/CMakeDetermineCCompiler.cmake | 7 | ||||
-rw-r--r-- | Modules/CMakeDetermineCXXCompiler.cmake | 7 |
2 files changed, 8 insertions, 6 deletions
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() |