summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2014-04-11 16:17:46 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2014-04-14 16:17:11 (GMT)
commitb0b4b4602fd5f8508d6fcbb9ea3236585e6368e2 (patch)
tree8ac1cdf1e032517058698ee49b2ece5a299a51c8 /Modules/CMakeDetermineCompilerId.cmake
parent5bd48ac5348885e15ebb23ea825a1ea777985b97 (diff)
downloadCMake-b0b4b4602fd5f8508d6fcbb9ea3236585e6368e2.zip
CMake-b0b4b4602fd5f8508d6fcbb9ea3236585e6368e2.tar.gz
CMake-b0b4b4602fd5f8508d6fcbb9ea3236585e6368e2.tar.bz2
Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 73cb92a..f109dc4 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -356,30 +356,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()
set(COMPILER_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES "INFO:platform\\[([^]\"]*)\\]")
set(PLATFORM_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO:arch\\[([^]\"]*)\\].*")
+ if("${info}" MATCHES "INFO:arch\\[([^]\"]*)\\]")
set(ARCHITECTURE_ID "${CMAKE_MATCH_1}")
endif()
- if("${info}" MATCHES ".*INFO: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\\[([^]\"]*)\\].*")
+ 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()