summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index d586275..937a120 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -765,6 +765,10 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}")
endif()
+ # Remove arbitrary text that may appear before or after each INFO string.
+ string(REGEX MATCHALL "INFO:[A-Za-z0-9_]+\\[([^]\"]*)\\]"
+ CMAKE_${lang}_COMPILER_ID_STRINGS "${CMAKE_${lang}_COMPILER_ID_STRINGS}")
+
# In C# binaries, some strings are found more than once.
list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS)