diff options
author | William R. Dieter <william.r.dieter@intel.com> | 2020-11-02 20:11:25 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-28 09:05:35 -0500 |
commit | a90d2a9eed202b58b72776f9beb0569e92c90d21 (patch) | |
tree | afddec15f77981ca45cc32a56602dff010767535 /Modules/CMakeFortranCompilerId.F.in | |
parent | 9bef4bef0fbe69825f9103365a89be4696b6e1d0 (diff) | |
download | cmake-a90d2a9eed202b58b72776f9beb0569e92c90d21.tar.gz |
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/CMakeFortranCompilerId.F.in')
-rw-r--r-- | Modules/CMakeFortranCompilerId.F.in | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 6ef798f20a..1cc08dfe81 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -22,7 +22,21 @@ PRINT *, 'INFO:simulate_version[013.00]' # endif #endif -#if defined(__INTEL_COMPILER) || defined(__ICC) +#if defined(__INTEL_LLVM_COMPILER) + PRINT *, 'INFO:compiler[IntelLLVM]' +! __INTEL_LLVM_COMPILER = VVVVRP prior to 2021.2.0, VVVVRRPP for 2021.2.0 and +! later. Look for 6 digit vs. 8 digit version number to decide encoding. +! VVVV is no smaller than the current year when a versio is released. +# if __INTEL_LLVM_COMPILER < 1000000 +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/100) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 10) +# else +# define COMPILER_VERSION_MAJOR DEC(__INTEL_LLVM_COMPILER/10000) +# define COMPILER_VERSION_MINOR DEC(__INTEL_LLVM_COMPILER/100 % 100) +# define COMPILER_VERSION_PATCH DEC(__INTEL_LLVM_COMPILER % 100) +# endif +#elif defined(__INTEL_COMPILER) || defined(__ICC) PRINT *, 'INFO:compiler[Intel]' # define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100) # define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10) |