diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index ca82d8af35..d5862754f7 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -752,10 +752,11 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) break() endif() endforeach() - set(COMPILER_ID_TWICE) + # With the IAR Compiler, some strings are found twice, first time as incomplete # list like "?". Remove the incomplete copies. list(FILTER CMAKE_${lang}_COMPILER_ID_STRINGS EXCLUDE REGEX "\\?