summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerABI.cmake
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2014-09-03 21:00:48 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2014-09-03 21:00:48 (GMT)
commit3e84e78c3fcd2575a4159c3a1619833a7a80ef17 (patch)
tree968ce764d01dc78dd6b09d941d42465e2a8b80d7 /Modules/CMakeDetermineCompilerABI.cmake
parentfb8acb74e83a591c1231c4a07c221f4392f4c0be (diff)
downloadCMake-3e84e78c3fcd2575a4159c3a1619833a7a80ef17.zip
CMake-3e84e78c3fcd2575a4159c3a1619833a7a80ef17.tar.gz
CMake-3e84e78c3fcd2575a4159c3a1619833a7a80ef17.tar.bz2
Use a more reliable regex for extracting binary INFO strings
A few different regular expressions were being used in various places to extract info strings from binaries. This uses a consistent regex amongst all of them now. This also fixes the broken ABI detection for Cray compilers.
Diffstat (limited to 'Modules/CMakeDetermineCompilerABI.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerABI.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerABI.cmake b/Modules/CMakeDetermineCompilerABI.cmake
index 4b7ec30..4bc42dd 100644
--- a/Modules/CMakeDetermineCompilerABI.cmake
+++ b/Modules/CMakeDetermineCompilerABI.cmake
@@ -52,7 +52,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
message(STATUS "Detecting ${lang} compiler ABI info - done")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Detecting ${lang} compiler ABI info compiled with the following output:\n${OUTPUT}\n\n")
- file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[^[]*\\[")
+ file(STRINGS "${BIN}" ABI_STRINGS LIMIT_COUNT 2 REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]")
foreach(info ${ABI_STRINGS})
if("${info}" MATCHES "INFO:sizeof_dptr\\[0*([^]]*)\\]")
set(ABI_SIZEOF_DPTR "${CMAKE_MATCH_1}")