summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorNorbert Lange <nolange79@gmail.com>2017-06-27 20:52:22 (GMT)
committerBrad King <brad.king@kitware.com>2017-06-29 17:25:57 (GMT)
commit0b1a2876c817a00daf7027570b1976a9e15ff654 (patch)
treea064c4e632d0517b19a173faeec9181de8cd4bf6 /Modules/CMakeDetermineCXXCompiler.cmake
parentfea7d69ddeedd72f6a1f8cec5a011696dec832db (diff)
downloadCMake-0b1a2876c817a00daf7027570b1976a9e15ff654.zip
CMake-0b1a2876c817a00daf7027570b1976a9e15ff654.tar.gz
CMake-0b1a2876c817a00daf7027570b1976a9e15ff654.tar.bz2
Add a CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID variable
Compilers such as MSVC and IAR may have variants that target different architectures. We have been using a `MSVC_<LANG>_ARCHITECTURE_ID` variable to hold this information for MSVC. Add an alternative with a more general name (later we can port MSVC to it too). This additional information may be needed to generate proper invocations of the compiler based on its architecture variant.
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 9150962..612dbb4 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -165,6 +165,13 @@ set(_CMAKE_PROCESSING_LANGUAGE "CXX")
include(Compiler/${CMAKE_CXX_COMPILER_ID}-FindBinUtils OPTIONAL)
unset(_CMAKE_PROCESSING_LANGUAGE)
+if(CMAKE_CXX_COMPILER_ARCHITECTURE_ID)
+ set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID
+ "set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID ${CMAKE_CXX_COMPILER_ARCHITECTURE_ID})")
+else()
+ set(_SET_CMAKE_CXX_COMPILER_ARCHITECTURE_ID "")
+endif()
+
if(MSVC_CXX_ARCHITECTURE_ID)
set(SET_MSVC_CXX_ARCHITECTURE_ID
"set(MSVC_CXX_ARCHITECTURE_ID ${MSVC_CXX_ARCHITECTURE_ID})")