summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorWilliam R. Dieter <william.r.dieter@intel.com>2020-11-03 01:11:25 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-28 14:05:35 (GMT)
commita90d2a9eed202b58b72776f9beb0569e92c90d21 (patch)
treeafddec15f77981ca45cc32a56602dff010767535 /Modules/CMakeDetermineCXXCompiler.cmake
parent9bef4bef0fbe69825f9103365a89be4696b6e1d0 (diff)
downloadCMake-a90d2a9eed202b58b72776f9beb0569e92c90d21.zip
CMake-a90d2a9eed202b58b72776f9beb0569e92c90d21.tar.gz
CMake-a90d2a9eed202b58b72776f9beb0569e92c90d21.tar.bz2
IntelLLVM: Add support for Intel LLVM-based compilers
Using a single ID 'IntelLLVM' for the suite of Intel compilers based on the LLVM backend. The 'IntelLLVM' ID are used for C, C++, and Fortran. Data Parallel C++ will be handled in a separate commit. The C and C++ definitions are based on the Clang definitions. The Intel LLVM-based C and C++ compilers are based on the Clang front end, so existing Clang options are more likely to be a good match than options for the older Intel compilers. Fortran is based on the older Fortran front end with the LLVM backend. It has a similar interface to the older versions, though many options are shared with the C and C++ compilers. Fixes: #21561 Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 7283bc2..fd07a5c 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -58,7 +58,7 @@ else()
# finally list compilers to try
if(NOT CMAKE_CXX_COMPILER_INIT)
- set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC clang++)
+ set(CMAKE_CXX_COMPILER_LIST CC ${_CMAKE_TOOLCHAIN_PREFIX}c++ ${_CMAKE_TOOLCHAIN_PREFIX}g++ aCC cl bcc xlC icpx icx clang++)
endif()
_cmake_find_compiler(CXX)
@@ -131,7 +131,8 @@ else()
# variable but are not aware of CMAKE_CXX_COMPILER_FRONTEND_VARIANT.
# They pre-date our support for the GNU-like variant targeting the
# MSVC ABI so we do not consider that here.
- if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang"
+ OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntelLLVM")
if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "MSVC")
else()