[cmake-commits] king committed CMakeDetermineCompilerId.cmake 1.1.2.1
1.1.2.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Apr 27 09:20:36 EDT 2007
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv8833
Modified Files:
Tag: CMake-Modules-CompilerId
CMakeDetermineCompilerId.cmake
Log Message:
BUG: Need to strip all text before and after the INFO block because the binary may contain string data leading up to the beginning of the strings.
Index: CMakeDetermineCompilerId.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Attic/CMakeDetermineCompilerId.cmake,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- CMakeDetermineCompilerId.cmake 27 Apr 2007 12:57:38 -0000 1.1.2.1
+++ CMakeDetermineCompilerId.cmake 27 Apr 2007 13:20:34 -0000 1.1.2.2
@@ -72,13 +72,13 @@
FILE(STRINGS ${CMAKE_${lang}_COMPILER_ID_EXE}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
- IF("${info}" MATCHES "INFO:compiler\\[(.*)\\]")
- STRING(REGEX REPLACE "INFO:compiler\\[(.*)\\]" "\\1"
+ IF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
+ STRING(REGEX REPLACE ".*INFO:compiler\\[(.*)\\].*" "\\1"
CMAKE_${lang}_COMPILER_ID "${info}")
- ELSEIF("${info}" MATCHES "INFO:platform\\[(.*)\\]")
- STRING(REGEX REPLACE "INFO:platform\\[(.*)\\]" "\\1"
+ ELSEIF("${info}" MATCHES ".*INFO:platform\\[(.*)\\].*")
+ STRING(REGEX REPLACE ".*INFO:platform\\[(.*)\\].*" "\\1"
CMAKE_${lang}_PLATFORM_ID "${info}")
- ENDIF("${info}" MATCHES "INFO:compiler\\[(.*)\\]")
+ ENDIF("${info}" MATCHES ".*INFO:compiler\\[(.*)\\].*")
ENDFOREACH(info)
# Check the compiler identification string.
More information about the Cmake-commits
mailing list