diff options
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index cddc966..7efe739 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -108,6 +108,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(CMAKE_${lang}_XCODE_CURRENT_ARCH "${CMAKE_${lang}_XCODE_CURRENT_ARCH}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) @@ -473,6 +474,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(COMPILER_VERSION_MINOR 0) set(COMPILER_VERSION_PATCH 0) set(COMPILER_VERSION_TWEAK 0) + set(COMPILER_VERSION_INTERNAL "") set(HAVE_COMPILER_VERSION_MAJOR 0) set(HAVE_COMPILER_VERSION_MINOR 0) set(HAVE_COMPILER_VERSION_PATCH 0) @@ -514,6 +516,10 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}") string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}") endif() + if("${info}" MATCHES "INFO:compiler_version_internal\\[([^]\"]*)\\]") + string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION_INTERNAL "${CMAKE_MATCH_1}") + string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}") + endif() foreach(comp MAJOR MINOR PATCH TWEAK) foreach(digit 1 2 3 4 5 6 7 8 9) if("${info}" MATCHES "INFO:compiler_version_${comp}_digit_${digit}\\[([0-9])\\]") @@ -589,6 +595,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}") set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}") + set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}") set(CMAKE_${lang}_SIMULATE_ID "${SIMULATE_ID}") set(CMAKE_${lang}_SIMULATE_VERSION "${SIMULATE_VERSION}") endif() @@ -640,6 +647,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) + set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE) set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE) |