mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 07:11:05 -06:00
IAR: Fix compiler id, version, and arch detection on 6.50.6
The IAR 6.50.6 compiler places extra/truncated copies of the compiler id `INFO:` strings into binaries with a prefix like `?<Constant "`. Teach CMakeDetermineCompilerId to ignore them. Fixes: #18333
This commit is contained in:
committed by
Brad King
parent
cc5bac458b
commit
8fdf08c097
@@ -525,6 +525,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
|
||||
${CMAKE_${lang}_COMPILER_ID_STRINGS_PARAMETERS}
|
||||
REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]")
|
||||
set(COMPILER_ID_TWICE)
|
||||
# With the IAR Compiler, some strings are found twice, first time as incomplete
|
||||
# list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies.
|
||||
list(FILTER CMAKE_${lang}_COMPILER_ID_STRINGS EXCLUDE REGEX "\\?<Constant \\\"")
|
||||
# In C# binaries, some strings are found more than once.
|
||||
list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS)
|
||||
foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
|
||||
|
||||
Reference in New Issue
Block a user