diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2018-09-11 13:24:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-11 14:43:03 (GMT) |
commit | 8fdf08c097edadd134dc36cc80b4b557cddbfea8 (patch) | |
tree | 0635778b622e544bdaeac15f88ee726feea128bd /Modules | |
parent | cc5bac458b85081f813a2c169fda104f59233c37 (diff) | |
download | CMake-8fdf08c097edadd134dc36cc80b4b557cddbfea8.zip CMake-8fdf08c097edadd134dc36cc80b4b557cddbfea8.tar.gz CMake-8fdf08c097edadd134dc36cc80b4b557cddbfea8.tar.bz2 |
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
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index dc4d9be..5e2df26a 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -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}) |