summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-04-29 13:36:55 (GMT)
committerBrad King <brad.king@kitware.com>2014-04-29 13:36:55 (GMT)
commitbbc358c3fc1f09fe2a483996ae1359dba3f587f4 (patch)
treeacbe60addb92ac90fc7c91f187a9d9226c2a95dd /Modules/CMakeDetermineCompilerId.cmake
parent0cce556b5fbe629dccee294aeece7c275343ed64 (diff)
parentc51d07d4397ceed55c534a036ef81df44b741ff6 (diff)
downloadCMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.zip
CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.gz
CMake-bbc358c3fc1f09fe2a483996ae1359dba3f587f4.tar.bz2
Merge branch 'master' into osx-init-early
Resolve conflict in Source/cmGlobalGenerator.cxx by integrating changes from both sides.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake31
1 files changed, 13 insertions, 18 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 9a256d5..17f27b3 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -27,7 +27,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
else()
set(CMAKE_${lang}_COMPILER_ID_FLAGS $ENV{${flagvar}})
endif()
- string(REGEX REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
+ string(REPLACE " " ";" CMAKE_${lang}_COMPILER_ID_FLAGS_LIST "${CMAKE_${lang}_COMPILER_ID_FLAGS}")
# Compute the directory in which to run the test.
set(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_PLATFORM_INFO_DIR}/CompilerId${lang})
@@ -367,35 +367,30 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 6 REGEX "INFO:")
set(COMPILER_ID_TWICE)
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
- if("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES "INFO:compiler\\[([^]\"]*)\\]")
if(COMPILER_ID)
set(COMPILER_ID_TWICE 1)
endif()
- string(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
- COMPILER_ID "${info}")
+ set(COMPILER_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
- string(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
- PLATFORM_ID "${info}")
+ if("${info}" MATCHES "INFO:platform\\[([^]\"]*)\\]")
+ set(PLATFORM_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
- string(REGEX REPLACE ".*INFO:arch\\[([^]]*)\\].*" "\\1"
- ARCHITECTURE_ID "${info}")
+ if("${info}" MATCHES "INFO:arch\\[([^]\"]*)\\]")
+ set(ARCHITECTURE_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:compiler_version\\[([^]\"]*)\\].*")
- string(REGEX REPLACE ".*INFO:compiler_version\\[([^]]*)\\].*" "\\1" COMPILER_VERSION "${info}")
- string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${COMPILER_VERSION}")
+ if("${info}" MATCHES "INFO:compiler_version\\[([^]\"]*)\\]")
+ string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
endif()
- if("${info}" MATCHES ".*INFO:simulate\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]")
set(SIMULATE_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:simulate_version\\[([^]\"]*)\\].*")
- set(SIMULATE_VERSION "${CMAKE_MATCH_1}")
- string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
+ if("${info}" MATCHES "INFO:simulate_version\\[([^]\"]*)\\]")
+ string(REGEX REPLACE "^0+([0-9])" "\\1" SIMULATE_VERSION "${CMAKE_MATCH_1}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" SIMULATE_VERSION "${SIMULATE_VERSION}")
endif()
- if("${info}" MATCHES ".*INFO:qnxnto")
+ if("${info}" MATCHES "INFO:qnxnto")
set(COMPILER_QNXNTO 1)
endif()
endforeach()