mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 15:19:51 -05:00
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.
This commit is contained in:
@@ -67,7 +67,7 @@ endif()
|
||||
set(FortranCInterface_SYMBOLS)
|
||||
if(FortranCInterface_EXE)
|
||||
file(STRINGS "${FortranCInterface_EXE}" _info_strings
|
||||
LIMIT_COUNT 8 REGEX "INFO:[^[]*\\[")
|
||||
LIMIT_COUNT 8 REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]")
|
||||
foreach(info ${_info_strings})
|
||||
if("${info}" MATCHES "INFO:symbol\\[([^]]*)\\]")
|
||||
list(APPEND FortranCInterface_SYMBOLS ${CMAKE_MATCH_1})
|
||||
|
||||
Reference in New Issue
Block a user