summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2015-12-02 14:47:43 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2015-12-07 16:09:06 (GMT)
commit5eaac0c96ac51e1300664ef37239f3215bb58489 (patch)
tree6ee1af9c2d05d450430d99fa136e40fdd83ed26c /Modules/CMakeDetermineCompilerId.cmake
parent4e29a514ad83c5711e7ee894b825203e8c302269 (diff)
downloadCMake-5eaac0c96ac51e1300664ef37239f3215bb58489.zip
CMake-5eaac0c96ac51e1300664ef37239f3215bb58489.tar.gz
CMake-5eaac0c96ac51e1300664ef37239f3215bb58489.tar.bz2
Compiler: Add infrastructure for detecting compiler wrappers
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 81c2509..eb54814 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -107,6 +107,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
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_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)
set(CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT "${CMAKE_${lang}_STANDARD_COMPUTED_DEFAULT}" PARENT_SCOPE)
@@ -435,6 +436,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(HAVE_COMPILER_VERSION_MINOR 0)
set(HAVE_COMPILER_VERSION_PATCH 0)
set(HAVE_COMPILER_VERSION_TWEAK 0)
+ set(COMPILER_WRAPPER)
set(DIGIT_VALUE_1 1)
set(DIGIT_VALUE_2 10)
set(DIGIT_VALUE_3 100)
@@ -476,6 +478,9 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
endif()
endforeach()
endforeach()
+ if("${info}" MATCHES "INFO:compiler_wrapper\\[([^]\"]*)\\]")
+ set(COMPILER_WRAPPER "${CMAKE_MATCH_1}")
+ endif()
if("${info}" MATCHES "INFO:simulate\\[([^]\"]*)\\]")
set(SIMULATE_ID "${CMAKE_MATCH_1}")
endif()
@@ -588,6 +593,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_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)
set(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)