From a90d2a9eed202b58b72776f9beb0569e92c90d21 Mon Sep 17 00:00:00 2001
From: "William R. Dieter" <william.r.dieter@intel.com>
Date: Mon, 2 Nov 2020 20:11:25 -0500
Subject: 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>
---
 Help/variable/CMAKE_LANG_COMPILER_ID.rst           |  1 +
 Modules/CMakeCompilerIdDetection.cmake             |  1 +
 Modules/CMakeDetermineASMCompiler.cmake            |  4 +
 Modules/CMakeDetermineCCompiler.cmake              |  5 +-
 Modules/CMakeDetermineCXXCompiler.cmake            |  5 +-
 Modules/CMakeDetermineCompilerId.cmake             |  3 +-
 Modules/CMakeDetermineFortranCompiler.cmake        |  8 +-
 ...atorDetermineCompilerMacrosAndIncludeDirs.cmake |  4 +-
 Modules/CMakeFortranCompilerId.F.in                | 16 +++-
 Modules/CMakeTestGNU.c                             |  3 +-
 Modules/Compiler/IntelLLVM-ASM.cmake               | 12 +++
 Modules/Compiler/IntelLLVM-C.cmake                 | 63 +++++++++++++++
 Modules/Compiler/IntelLLVM-CXX.cmake               | 69 ++++++++++++++++
 Modules/Compiler/IntelLLVM-DetermineCompiler.cmake | 41 ++++++++++
 Modules/Compiler/IntelLLVM-Fortran.cmake           | 19 +++++
 Modules/Compiler/IntelLLVM.cmake                   | 93 ++++++++++++++++++++++
 Modules/Platform/Apple-IntelLLVM-C.cmake           |  2 +
 Modules/Platform/Apple-IntelLLVM-CXX.cmake         |  2 +
 Modules/Platform/Apple-IntelLLVM-Fortran.cmake     |  8 ++
 Modules/Platform/Apple-IntelLLVM.cmake             | 17 ++++
 Modules/Platform/Linux-IntelLLVM-C.cmake           |  3 +
 Modules/Platform/Linux-IntelLLVM-CXX.cmake         |  3 +
 Modules/Platform/Linux-IntelLLVM-Fortran.cmake     |  4 +
 Modules/Platform/Linux-IntelLLVM.cmake             | 55 +++++++++++++
 Modules/Platform/Windows-IntelLLVM-ASM.cmake       |  2 +
 Modules/Platform/Windows-IntelLLVM-C.cmake         |  2 +
 Modules/Platform/Windows-IntelLLVM-CXX.cmake       |  3 +
 Modules/Platform/Windows-IntelLLVM-Fortran.cmake   | 44 ++++++++++
 Modules/Platform/Windows-IntelLLVM.cmake           | 17 ++++
 29 files changed, 497 insertions(+), 12 deletions(-)
 create mode 100644 Modules/Compiler/IntelLLVM-ASM.cmake
 create mode 100644 Modules/Compiler/IntelLLVM-C.cmake
 create mode 100644 Modules/Compiler/IntelLLVM-CXX.cmake
 create mode 100644 Modules/Compiler/IntelLLVM-DetermineCompiler.cmake
 create mode 100644 Modules/Compiler/IntelLLVM-Fortran.cmake
 create mode 100644 Modules/Compiler/IntelLLVM.cmake
 create mode 100644 Modules/Platform/Apple-IntelLLVM-C.cmake
 create mode 100644 Modules/Platform/Apple-IntelLLVM-CXX.cmake
 create mode 100644 Modules/Platform/Apple-IntelLLVM-Fortran.cmake
 create mode 100644 Modules/Platform/Apple-IntelLLVM.cmake
 create mode 100644 Modules/Platform/Linux-IntelLLVM-C.cmake
 create mode 100644 Modules/Platform/Linux-IntelLLVM-CXX.cmake
 create mode 100644 Modules/Platform/Linux-IntelLLVM-Fortran.cmake
 create mode 100644 Modules/Platform/Linux-IntelLLVM.cmake
 create mode 100644 Modules/Platform/Windows-IntelLLVM-ASM.cmake
 create mode 100644 Modules/Platform/Windows-IntelLLVM-C.cmake
 create mode 100644 Modules/Platform/Windows-IntelLLVM-CXX.cmake
 create mode 100644 Modules/Platform/Windows-IntelLLVM-Fortran.cmake
 create mode 100644 Modules/Platform/Windows-IntelLLVM.cmake

diff --git a/Help/variable/CMAKE_LANG_COMPILER_ID.rst b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
index 1270610..89d9e27 100644
--- a/Help/variable/CMAKE_LANG_COMPILER_ID.rst
+++ b/Help/variable/CMAKE_LANG_COMPILER_ID.rst
@@ -25,6 +25,7 @@ include:
   HP = Hewlett-Packard Compiler (hp.com)
   IAR = IAR Systems (iar.com)
   Intel = Intel Compiler (intel.com)
+  IntelLLVM = Intel LLVM-Based Compiler (intel.com)
   MSVC = Microsoft Visual Studio (microsoft.com)
   NVHPC = NVIDIA HPC SDK Compiler (nvidia.com)
   NVIDIA = NVIDIA CUDA Compiler (nvidia.com)
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index d64804e..214d58a 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -49,6 +49,7 @@ function(compiler_id_detection outvar lang)
     endif()
     list(APPEND ordered_compilers
       Intel
+      IntelLLVM
       PathScale
       Embarcadero
       Borland
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index a3e5a12..e8b9db7 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -78,6 +78,10 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
   set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_Intel "--version")
   set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_Intel "(ICC)")
 
+  list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS IntelLLVM )
+  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_IntelLLVM "--version")
+  set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_IntelLLVM "(Intel[^\n]+oneAPI)")
+
   list(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS SunPro )
   set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_SunPro "-V")
   set(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_SunPro "Sun C")
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index ab33b40..59c0574 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -59,7 +59,7 @@ else()
 
     # finally list compilers to try
     if(NOT CMAKE_C_COMPILER_INIT)
-      set(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc clang)
+      set(CMAKE_C_COMPILER_LIST ${_CMAKE_TOOLCHAIN_PREFIX}cc ${_CMAKE_TOOLCHAIN_PREFIX}gcc cl bcc xlc icx clang)
     endif()
 
     _cmake_find_compiler(C)
@@ -134,7 +134,8 @@ else()
     # variable but are not aware of CMAKE_C_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_C_COMPILER_ID STREQUAL "Clang")
+    if(CMAKE_C_COMPILER_ID STREQUAL "Clang"
+      OR "x${CMAKE_${lang}_COMPILER_ID" STREQUAL "xIntelLLVM")
       if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
         set(CMAKE_C_COMPILER_FRONTEND_VARIANT "MSVC")
       else()
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()
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index d07db70..90697f0 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -164,7 +164,8 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
   endif()
 
   set(_variant "")
-  if("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xClang")
+  if("x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xClang"
+    OR "x${CMAKE_${lang}_COMPILER_ID}" STREQUAL "xIntelLLVM")
     if("x${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "xMSVC")
       if(CMAKE_GENERATOR MATCHES "Visual Studio")
         set(CMAKE_${lang}_COMPILER_FRONTEND_VARIANT "MSVC")
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 8a57408..d7d032c 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -59,6 +59,8 @@ else()
       #  af77: Apogee F77 compiler for Intergraph hardware running CLIX
       #  epcf90: "Edinburgh Portable Compiler" F90
       #  fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
+      #  ifx: Intel Fortran LLVM-based compiler
+      #  ifort: Intel Classic Fortran compiler
       #  ifc: Intel Fortran 95 compiler for Linux/x86
       #  efc: Intel Fortran 95 compiler for IA64
       #  nagfor: NAG Fortran compiler
@@ -68,14 +70,14 @@ else()
       #  so if you paid for a compiler it is picked by default.
       if(CMAKE_HOST_WIN32)
         set(CMAKE_Fortran_COMPILER_LIST
-          ifort pgf95 pgfortran lf95 fort
+          ifort ifx pgf95 pgfortran lf95 fort
           flang gfortran gfortran-4 g95 f90 pgf90
           pgf77 g77 f77 nag
           )
       else()
         set(CMAKE_Fortran_COMPILER_LIST
           ftn
-          ifort ifc efc pgf95 pgfortran lf95 xlf95 fort
+          ifort ifc ifx efc pgf95 pgfortran lf95 xlf95 fort
           flang gfortran gfortran-4 g95 f90 pgf90
           frt pgf77 xlf g77 f77 nag
           )
@@ -83,7 +85,7 @@ else()
 
       # Vendor-specific compiler names.
       set(_Fortran_COMPILER_NAMES_GNU       gfortran gfortran-4 g95 g77)
-      set(_Fortran_COMPILER_NAMES_Intel     ifort ifc efc)
+      set(_Fortran_COMPILER_NAMES_Intel     ifort ifc efc ifx)
       set(_Fortran_COMPILER_NAMES_Absoft    af95 af90 af77)
       set(_Fortran_COMPILER_NAMES_PGI       pgf95 pgfortran pgf90 pgf77)
       set(_Fortran_COMPILER_NAMES_Flang     flang)
diff --git a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
index 11f4a29..f90301b 100644
--- a/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
+++ b/Modules/CMakeExtraGeneratorDetermineCompilerMacrosAndIncludeDirs.cmake
@@ -88,7 +88,7 @@ set(ENV{LANG}        C)
 
 # Now check for C, works for gcc and Intel compiler at least
 if (NOT CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS)
-  if (CMAKE_C_COMPILER_ID MATCHES GNU  OR  CMAKE_C_COMPILER_ID MATCHES Intel  OR  CMAKE_C_COMPILER_ID MATCHES Clang)
+  if (CMAKE_C_COMPILER_ID MATCHES GNU  OR  CMAKE_C_COMPILER_ID MATCHES "Intel"  OR  CMAKE_C_COMPILER_ID MATCHES Clang)
     _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs _defines)
     set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
     set(CMAKE_EXTRA_GENERATOR_C_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "C compiler system defined macros")
@@ -99,7 +99,7 @@ endif ()
 
 # And now the same for C++
 if (NOT CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS)
-  if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU  OR  "${CMAKE_CXX_COMPILER_ID}" MATCHES Intel  OR  "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
+  if ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU  OR  "${CMAKE_CXX_COMPILER_ID}" MATCHES "Intel"  OR  "${CMAKE_CXX_COMPILER_ID}" MATCHES Clang)
     _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs _defines)
     set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
     set(CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_DEFINED_MACROS "${_defines}" CACHE INTERNAL "CXX compiler system defined macros")
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 6ef798f..1cc08df 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)
diff --git a/Modules/CMakeTestGNU.c b/Modules/CMakeTestGNU.c
index 933e5a2..7dcafde 100644
--- a/Modules/CMakeTestGNU.c
+++ b/Modules/CMakeTestGNU.c
@@ -1,4 +1,5 @@
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#if defined(__GNUC__) &&                                                      \
+  !(defined(__INTEL_COMPILER) || defined(__INTEL_LLVM_COMPILER))
 void THIS_IS_GNU();
 #endif
 #ifdef __MINGW32__
diff --git a/Modules/Compiler/IntelLLVM-ASM.cmake b/Modules/Compiler/IntelLLVM-ASM.cmake
new file mode 100644
index 0000000..c258a0a
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM-ASM.cmake
@@ -0,0 +1,12 @@
+include(Compiler/IntelLLVM)
+__compiler_intel_llvm(ASM)
+
+string(APPEND CMAKE_ASM_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
+string(APPEND CMAKE_ASM_FLAGS_RELEASE_INIT " -DNDEBUG")
+string(APPEND CMAKE_ASM_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
+
+if(UNIX)
+  set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s;S)
+else()
+  set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS asm)
+endif()
diff --git a/Modules/Compiler/IntelLLVM-C.cmake b/Modules/Compiler/IntelLLVM-C.cmake
new file mode 100644
index 0000000..0ad2f0d
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM-C.cmake
@@ -0,0 +1,63 @@
+include(Compiler/IntelLLVM)
+__compiler_intel_llvm(C)
+
+if("x${CMAKE_C_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
+  set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -TC)
+  set(CMAKE_C_CLANG_TIDY_DRIVER_MODE "cl")
+  if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+      AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+      AND CMAKE_DEPFILE_FLAGS_C)
+    set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+  endif()
+else()
+  set(CMAKE_C_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c)
+  if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+      AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+      AND CMAKE_DEPFILE_FLAGS_C)
+    # dependencies are computed by the compiler itself
+    set(CMAKE_C_DEPFILE_FORMAT gcc)
+    set(CMAKE_C_DEPENDS_USE_COMPILER TRUE)
+  endif()
+
+  string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
+  string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
+  string(APPEND CMAKE_C_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
+endif()
+
+set(CMAKE_C90_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C99_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C11_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_C17_STANDARD__HAS_FULL_SUPPORT ON)
+
+if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+  set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c90")
+  set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=gnu90")
+
+  set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99")
+  set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=gnu99")
+
+  set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11")
+  set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
+
+  set(CMAKE_C17_STANDARD_COMPILE_OPTION "-std=c17")
+  set(CMAKE_C17_EXTENSION_COMPILE_OPTION "-std=gnu17")
+else()
+  # clang-cl doesn't have any of these
+  set(CMAKE_C90_STANDARD_COMPILE_OPTION "")
+  set(CMAKE_C90_EXTENSION_COMPILE_OPTION "")
+
+  set(CMAKE_C99_STANDARD_COMPILE_OPTION "")
+  set(CMAKE_C99_EXTENSION_COMPILE_OPTION "")
+
+  set(CMAKE_C11_STANDARD_COMPILE_OPTION "")
+  set(CMAKE_C11_EXTENSION_COMPILE_OPTION "")
+
+  set(CMAKE_C17_STANDARD_COMPILE_OPTION "")
+  set(CMAKE_C17_EXTENSION_COMPILE_OPTION "")
+endif()
+
+if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC")
+  __compiler_check_default_language_standard(C 2020 17)
+else()
+  set(CMAKE_C_STANDARD_DEFAULT "")
+endif()
diff --git a/Modules/Compiler/IntelLLVM-CXX.cmake b/Modules/Compiler/IntelLLVM-CXX.cmake
new file mode 100644
index 0000000..4c0c26e
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM-CXX.cmake
@@ -0,0 +1,69 @@
+include(Compiler/IntelLLVM)
+__compiler_intel_llvm(CXX)
+
+if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xMSVC")
+  set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -TP)
+  set(CMAKE_CXX_CLANG_TIDY_DRIVER_MODE "cl")
+  if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+      AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+      AND CMAKE_DEPFILE_FLAGS_CXX)
+    set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
+  endif()
+else()
+  set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+  if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+      AND CMAKE_GENERATOR MATCHES "Makefiles|WMake"
+      AND CMAKE_DEPFILE_FLAGS_CXX)
+    # dependencies are computed by the compiler itself
+    set(CMAKE_CXX_DEPFILE_FORMAT gcc)
+    set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
+  endif()
+
+  set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
+
+  string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
+  string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
+  string(APPEND CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT " -DNDEBUG")
+endif()
+
+set(CMAKE_CXX98_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_CXX11_STANDARD__HAS_FULL_SUPPORT ON)
+set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
+
+if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+  set(CMAKE_CXX98_STANDARD_COMPILE_OPTION  "-std=c++98")
+  set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "-std=gnu++98")
+
+  set(CMAKE_CXX11_STANDARD_COMPILE_OPTION  "-std=c++11")
+  set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-std=gnu++11")
+
+  set(CMAKE_CXX14_STANDARD_COMPILE_OPTION  "-std=c++14")
+  set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++14")
+
+  set(CMAKE_CXX17_STANDARD_COMPILE_OPTION  "-std=c++17")
+  set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
+
+  set(CMAKE_CXX20_STANDARD_COMPILE_OPTION  "-std=c++20")
+  set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++20")
+else()
+  set(CMAKE_CXX98_STANDARD_COMPILE_OPTION  "")
+  set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")
+
+  set(CMAKE_CXX11_STANDARD_COMPILE_OPTION  "-Qstd=c++11")
+  set(CMAKE_CXX11_EXTENSION_COMPILE_OPTION "-Qstd=c++11")
+
+  set(CMAKE_CXX14_STANDARD_COMPILE_OPTION  "-Qstd=c++14")
+  set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-Qstd=c++14")
+
+  set(CMAKE_CXX17_STANDARD_COMPILE_OPTION  "-Qstd=c++17")
+  set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-Qstd=c++17")
+
+  set(CMAKE_CXX20_STANDARD_COMPILE_OPTION  "-Qstd=c++20")
+  set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-Qstd=c++20")
+endif()
+
+if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+  __compiler_check_default_language_standard(CXX 2020 14)
+else()
+  set(CMAKE_CXX_STANDARD_DEFAULT "")
+endif()
diff --git a/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake b/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake
new file mode 100644
index 0000000..124dafe
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM-DetermineCompiler.cmake
@@ -0,0 +1,41 @@
+
+set(_compiler_id_pp_test "(defined(__clang__) && defined(__INTEL_CLANG_COMPILER)) || defined(__INTEL_LLVM_COMPILER)")
+
+set(_compiler_id_version_compute "
+/* __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 < 1000000L
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__INTEL_LLVM_COMPILER/100)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__INTEL_LLVM_COMPILER/10 % 10)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__INTEL_LLVM_COMPILER    % 10)
+#else
+# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__INTEL_LLVM_COMPILER/10000)
+# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__INTEL_LLVM_COMPILER/100 % 100)
+# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__INTEL_LLVM_COMPILER     % 100)
+#endif
+#if defined(_MSC_VER)
+  /* _MSC_VER = VVRR */
+# define @PREFIX@SIMULATE_VERSION_MAJOR @MACRO_DEC@(_MSC_VER / 100)
+# define @PREFIX@SIMULATE_VERSION_MINOR @MACRO_DEC@(_MSC_VER % 100)
+#endif
+#if defined(__GNUC__)
+# define @PREFIX@SIMULATE_VERSION_MAJOR @MACRO_DEC@(__GNUC__)
+#elif defined(__GNUG__)
+# define @PREFIX@SIMULATE_VERSION_MAJOR @MACRO_DEC@(__GNUG__)
+#endif
+#if defined(__GNUC_MINOR__)
+# define @PREFIX@SIMULATE_VERSION_MINOR @MACRO_DEC@(__GNUC_MINOR__)
+#endif
+#if defined(__GNUC_PATCHLEVEL__)
+# define @PREFIX@SIMULATE_VERSION_PATCH @MACRO_DEC@(__GNUC_PATCHLEVEL__)
+#endif")
+
+set(_compiler_id_simulate "
+#if defined(_MSC_VER)
+# define @PREFIX@SIMULATE_ID \"MSVC\"
+#endif
+#if defined(__GNUC__)
+# define @PREFIX@SIMULATE_ID \"GNU\"
+#endif")
diff --git a/Modules/Compiler/IntelLLVM-Fortran.cmake b/Modules/Compiler/IntelLLVM-Fortran.cmake
new file mode 100644
index 0000000..3dfa099
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM-Fortran.cmake
@@ -0,0 +1,19 @@
+include(Compiler/IntelLLVM)
+__compiler_intel_llvm(Fortran)
+
+set(CMAKE_Fortran_SUBMODULE_SEP "@")
+set(CMAKE_Fortran_SUBMODULE_EXT ".smod")
+
+set(CMAKE_Fortran_MODDIR_FLAG "-module ")
+set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-fixed")
+set(CMAKE_Fortran_FORMAT_FREE_FLAG "-free")
+
+set(CMAKE_Fortran_COMPILE_WITH_DEFINES 1)
+
+set(CMAKE_Fortran_CREATE_PREPROCESSED_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_Fortran_CREATE_ASSEMBLY_SOURCE "<CMAKE_Fortran_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+
+set(CMAKE_Fortran_PREPROCESS_SOURCE
+  "<CMAKE_Fortran_COMPILER> -fpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_ON "-fpp")
+set(CMAKE_Fortran_COMPILE_OPTIONS_PREPROCESS_OFF "-nofpp")
diff --git a/Modules/Compiler/IntelLLVM.cmake b/Modules/Compiler/IntelLLVM.cmake
new file mode 100644
index 0000000..43eb13a
--- /dev/null
+++ b/Modules/Compiler/IntelLLVM.cmake
@@ -0,0 +1,93 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__COMPILER_LLVM_INTEL)
+  return()
+endif()
+set(__COMPILER_LLVM_INTEL 1)
+
+include(Compiler/CMakeCommonCompilerMacros)
+
+set(__pch_header_C "c-header")
+set(__pch_header_CXX "c++-header")
+set(__pch_header_OBJC "objective-c-header")
+set(__pch_header_OBJCXX "objective-c++-header")
+
+if(CMAKE_HOST_WIN32)
+  # MSVC-like
+  macro(__compiler_intel_llvm lang)
+    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-imsvc ")
+    if(NOT "x${lang}" STREQUAL "xFortran")
+      set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch)
+    endif()
+  endmacro()
+else()
+  # GNU-like
+  macro(__compiler_intel_llvm lang)
+    set(CMAKE_${lang}_VERBOSE_FLAG "-v")
+
+    string(APPEND CMAKE_${lang}_FLAGS_INIT " ")
+    string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
+    string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os")
+    string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3")
+    string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g")
+
+    set(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
+    set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
+    set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
+    set(CMAKE_${lang}_LINK_OPTIONS_PIE ${CMAKE_${lang}_COMPILE_OPTIONS_PIE} "-pie")
+    set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "-no-pie")
+
+    set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
+    set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+
+    set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+    set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
+    # distcc does not transform -o to -MT when invoking the preprocessor
+    # internally, as it ought to.  Work around this bug by setting -MT here
+    # even though it isn't strictly necessary.
+    set(CMAKE_DEPFILE_FLAGS_${lang} "-MD -MT <DEP_TARGET> -MF <DEP_FILE>")
+
+    set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ")
+    set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
+    set(CMAKE_${lang}_COMPILE_OPTIONS_TARGET "--target=")
+    set(CMAKE_${lang}_COMPILE_OPTIONS_SYSROOT "--sysroot=")
+    set(CMAKE_${lang}_COMPILE_OPTIONS_EXTERNAL_TOOLCHAIN "--gcc-toolchain=")
+    set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Xlinker" " ")
+    set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP)
+
+    set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
+    set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
+    set(CMAKE_${lang}_COMPILE_OPTIONS_IPO "-flto=thin")
+    set(CMAKE_${lang}_ARCHIVE_CREATE_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" cr <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_${lang}_ARCHIVE_APPEND_IPO "\"${CMAKE_${lang}_COMPILER_AR}\" r <TARGET> <LINK_FLAGS> <OBJECTS>")
+    set(CMAKE_${lang}_ARCHIVE_FINISH_IPO "\"${CMAKE_${lang}_COMPILER_RANLIB}\" <TARGET>")
+
+    set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
+    set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>")
+
+    set(CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "${CMAKE_${lang}_COMPILER}")
+    if(CMAKE_${lang}_COMPILER_ARG1)
+      separate_arguments(_COMPILER_ARGS NATIVE_COMMAND "${CMAKE_${lang}_COMPILER_ARG1}")
+      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND ${_COMPILER_ARGS})
+      unset(_COMPILER_ARGS)
+    endif()
+    list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "-dM" "-E" "-c" "${CMAKE_ROOT}/Modules/CMakeCXXCompilerABI.cpp")
+    if(CMAKE_${lang}_COMPILER_TARGET)
+      list(APPEND CMAKE_${lang}_COMPILER_PREDEFINES_COMMAND "--target=${CMAKE_${lang}_COMPILER_TARGET}")
+    endif()
+
+    if(NOT "x${lang}" STREQUAL "xFortran")
+      # Precompile Headers
+      set(CMAKE_PCH_EXTENSION .pch)
+      set(CMAKE_PCH_PROLOGUE "#pragma clang system_header")
+      set(CMAKE_${lang}_COMPILE_OPTIONS_INSTANTIATE_TEMPLATES_PCH -fpch-instantiate-templates)
+      set(CMAKE_${lang}_COMPILE_OPTIONS_INVALID_PCH -Winvalid-pch)
+      set(CMAKE_${lang}_COMPILE_OPTIONS_USE_PCH -Xclang -include-pch -Xclang <PCH_FILE> -Xclang -include -Xclang <PCH_HEADER>)
+      set(CMAKE_${lang}_COMPILE_OPTIONS_CREATE_PCH -Xclang -emit-pch -Xclang -include -Xclang <PCH_HEADER> -x ${__pch_header_${lang}})
+    endif()
+  endmacro()
+endif()
diff --git a/Modules/Platform/Apple-IntelLLVM-C.cmake b/Modules/Platform/Apple-IntelLLVM-C.cmake
new file mode 100644
index 0000000..8e74729
--- /dev/null
+++ b/Modules/Platform/Apple-IntelLLVM-C.cmake
@@ -0,0 +1,2 @@
+include(Platform/Apple-IntelLLVM)
+__apple_compiler_intel_llvm(C)
diff --git a/Modules/Platform/Apple-IntelLLVM-CXX.cmake b/Modules/Platform/Apple-IntelLLVM-CXX.cmake
new file mode 100644
index 0000000..38640e1
--- /dev/null
+++ b/Modules/Platform/Apple-IntelLLVM-CXX.cmake
@@ -0,0 +1,2 @@
+include(Platform/Apple-IntelLLVM)
+__apple_compiler_intel_llvm(CXX)
diff --git a/Modules/Platform/Apple-IntelLLVM-Fortran.cmake b/Modules/Platform/Apple-IntelLLVM-Fortran.cmake
new file mode 100644
index 0000000..d0486ed
--- /dev/null
+++ b/Modules/Platform/Apple-IntelLLVM-Fortran.cmake
@@ -0,0 +1,8 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+include(Platform/Apple-IntelLLVM)
+__apple_compiler_intel_llvm(Fortran)
+
+set(CMAKE_Fortran_OSX_COMPATIBILITY_VERSION_FLAG "-compatibility_version ")
+set(CMAKE_Fortran_OSX_CURRENT_VERSION_FLAG "-current_version ")
diff --git a/Modules/Platform/Apple-IntelLLVM.cmake b/Modules/Platform/Apple-IntelLLVM.cmake
new file mode 100644
index 0000000..2f9f0ca
--- /dev/null
+++ b/Modules/Platform/Apple-IntelLLVM.cmake
@@ -0,0 +1,17 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+include_guard()
+
+macro(__apple_compiler_intel_llvm lang)
+  set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output
+  set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-dynamiclib -Wl,-headerpad_max_install_names")
+  set(CMAKE_SHARED_MODULE_CREATE_${lang}_FLAGS "-bundle -Wl,-headerpad_max_install_names")
+
+  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
+  set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
+endmacro()
diff --git a/Modules/Platform/Linux-IntelLLVM-C.cmake b/Modules/Platform/Linux-IntelLLVM-C.cmake
new file mode 100644
index 0000000..5356c4f
--- /dev/null
+++ b/Modules/Platform/Linux-IntelLLVM-C.cmake
@@ -0,0 +1,3 @@
+include(Platform/Linux-IntelLLVM)
+__linux_compiler_intel_llvm(C)
+set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ")
diff --git a/Modules/Platform/Linux-IntelLLVM-CXX.cmake b/Modules/Platform/Linux-IntelLLVM-CXX.cmake
new file mode 100644
index 0000000..44ce0e8
--- /dev/null
+++ b/Modules/Platform/Linux-IntelLLVM-CXX.cmake
@@ -0,0 +1,3 @@
+include(Platform/Linux-IntelLLVM)
+__linux_compiler_intel_llvm(CXX)
+set(CMAKE_INCLUDE_SYSTEM_FLAG_CXX "-isystem ")
diff --git a/Modules/Platform/Linux-IntelLLVM-Fortran.cmake b/Modules/Platform/Linux-IntelLLVM-Fortran.cmake
new file mode 100644
index 0000000..1cd9b1f
--- /dev/null
+++ b/Modules/Platform/Linux-IntelLLVM-Fortran.cmake
@@ -0,0 +1,4 @@
+include(Platform/Linux-IntelLLVM)
+__linux_compiler_intel_llvm(Fortran)
+string(APPEND CMAKE_SHARED_LIBRARY_CREATE_Fortran_FLAGS " -nofor-main")
+set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS "")
diff --git a/Modules/Platform/Linux-IntelLLVM.cmake b/Modules/Platform/Linux-IntelLLVM.cmake
new file mode 100644
index 0000000..1363b44
--- /dev/null
+++ b/Modules/Platform/Linux-IntelLLVM.cmake
@@ -0,0 +1,55 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__LINUX_COMPILER_INTEL_LLVM)
+  return()
+endif()
+set(__LINUX_COMPILER_INTEL_LLVM 1)
+
+if(NOT XIAR)
+  set(_intel_xiar_hints)
+  foreach(lang C CXX Fortran)
+    if(IS_ABSOLUTE "${CMAKE_${lang}_COMPILER}")
+      get_filename_component(_hint "${CMAKE_${lang}_COMPILER}" PATH)
+      list(APPEND _intel_xiar_hints ${_hint})
+    endif()
+  endforeach()
+  find_program(XIAR NAMES xiar HINTS ${_intel_xiar_hints})
+  mark_as_advanced(XIAR)
+endif()
+
+macro(__linux_compiler_intel_llvm lang)
+  set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
+  set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
+  set(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER NO)
+  set(_CMAKE_${lang}_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
+  set(CMAKE_${lang}_LINK_OPTIONS_PIE ${CMAKE_${lang}_COMPILE_OPTIONS_PIE} "-pie")
+  set(CMAKE_${lang}_LINK_OPTIONS_NO_PIE "-no-pie")
+  set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
+  set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+
+  # We pass this for historical reasons.  Projects may have
+  # executables that use dlopen but do not set ENABLE_EXPORTS.
+  set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-rdynamic")
+
+  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG "-Wl,")
+  set(CMAKE_${lang}_LINKER_WRAPPER_FLAG_SEP ",")
+
+  set(_CMAKE_${lang}_IPO_SUPPORTED_BY_CMAKE YES)
+
+  if(XIAR)
+    # INTERPROCEDURAL_OPTIMIZATION
+    set(CMAKE_${lang}_COMPILE_OPTIONS_IPO -ipo)
+    set(CMAKE_${lang}_CREATE_STATIC_LIBRARY_IPO
+      "${XIAR} cr <TARGET> <LINK_FLAGS> <OBJECTS> "
+      "${XIAR} -s <TARGET> ")
+    set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER YES)
+    set(_CMAKE_${lang}_IPO_LEGACY_BEHAVIOR YES)
+  else()
+    set(_CMAKE_${lang}_IPO_MAY_BE_SUPPORTED_BY_COMPILER NO)
+  endif()
+
+  set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
+endmacro()
diff --git a/Modules/Platform/Windows-IntelLLVM-ASM.cmake b/Modules/Platform/Windows-IntelLLVM-ASM.cmake
new file mode 100644
index 0000000..f355e49
--- /dev/null
+++ b/Modules/Platform/Windows-IntelLLVM-ASM.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-IntelLLVM)
+__windows_compiler_intel(ASM)
diff --git a/Modules/Platform/Windows-IntelLLVM-C.cmake b/Modules/Platform/Windows-IntelLLVM-C.cmake
new file mode 100644
index 0000000..93c3364
--- /dev/null
+++ b/Modules/Platform/Windows-IntelLLVM-C.cmake
@@ -0,0 +1,2 @@
+include(Platform/Windows-IntelLLVM)
+__windows_compiler_intel(C)
diff --git a/Modules/Platform/Windows-IntelLLVM-CXX.cmake b/Modules/Platform/Windows-IntelLLVM-CXX.cmake
new file mode 100644
index 0000000..4667895
--- /dev/null
+++ b/Modules/Platform/Windows-IntelLLVM-CXX.cmake
@@ -0,0 +1,3 @@
+include(Platform/Windows-IntelLLVM)
+set(_COMPILE_CXX " /TP")
+__windows_compiler_intel(CXX)
diff --git a/Modules/Platform/Windows-IntelLLVM-Fortran.cmake b/Modules/Platform/Windows-IntelLLVM-Fortran.cmake
new file mode 100644
index 0000000..06d0a00
--- /dev/null
+++ b/Modules/Platform/Windows-IntelLLVM-Fortran.cmake
@@ -0,0 +1,44 @@
+include(Platform/Windows-IntelLLVM)
+set(CMAKE_BUILD_TYPE_INIT Debug)
+set(_COMPILE_Fortran " /fpp")
+set(CMAKE_Fortran_MODDIR_FLAG "-module:")
+set(CMAKE_Fortran_STANDARD_LIBRARIES_INIT "user32.lib")
+__windows_compiler_intel(Fortran)
+if(CMAKE_MSVC_RUNTIME_LIBRARY_DEFAULT)
+  set(_LIBSDLL "")
+  set(_DBGLIBS "")
+  set(_THREADS "")
+else()
+  set(_LIBSDLL " /libs:dll")
+  set(_DBGLIBS " /dbglibs")
+  set(_THREADS " /threads")
+endif()
+
+cmake_policy(GET CMP0092 _cmp0092)
+if(NOT _cmp0092 STREQUAL "NEW")
+  string(APPEND CMAKE_Fortran_FLAGS_INIT " /W1")
+endif()
+unset(_cmp0092)
+
+string(APPEND CMAKE_Fortran_FLAGS_INIT " /nologo /fpp${_LIBSDLL}${_THREADS}")
+string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " /Od /debug:full${_DBGLIBS}")
+string(APPEND CMAKE_Fortran_FLAGS_MINSIZEREL_INIT " /O1 /DNDEBUG")
+string(APPEND CMAKE_Fortran_FLAGS_RELEASE_INIT " /O2 /DNDEBUG")
+string(APPEND CMAKE_Fortran_FLAGS_RELWITHDEBINFO_INIT " /O2 /debug:full /DNDEBUG")
+unset(_LIBSDLL)
+unset(_DBGLIBS)
+unset(_THREADS)
+
+set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreaded         -threads -libs:static)
+set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDLL      -threads -libs:dll)
+set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebug    -threads -libs:static -dbglibs)
+set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_MultiThreadedDebugDLL -threads -libs:dll    -dbglibs)
+
+# Intel Fortran for Windows supports single-threaded RTL but it is
+# not implemented by the Visual Studio integration.
+if(NOT CMAKE_GENERATOR MATCHES "Visual Studio")
+  set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_SingleThreaded                 -libs:static)
+  set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_SingleThreadedDLL              -libs:dll)
+  set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_SingleThreadedDebug            -libs:static -dbglibs)
+  set(CMAKE_Fortran_COMPILE_OPTIONS_MSVC_RUNTIME_LIBRARY_SingleThreadedDebugDLL         -libs:dll    -dbglibs)
+endif()
diff --git a/Modules/Platform/Windows-IntelLLVM.cmake b/Modules/Platform/Windows-IntelLLVM.cmake
new file mode 100644
index 0000000..b9ea037
--- /dev/null
+++ b/Modules/Platform/Windows-IntelLLVM.cmake
@@ -0,0 +1,17 @@
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__WINDOWS_INTEL)
+  return()
+endif()
+set(__WINDOWS_INTEL 1)
+
+include(Platform/Windows-MSVC)
+macro(__windows_compiler_intel lang)
+  __windows_compiler_msvc(${lang})
+
+  set(CMAKE_DEPFILE_FLAGS_${lang} "-QMMD -QMT <DEP_TARGET> -QMF <DEP_FILE>")
+  set(CMAKE_${lang}_DEPFILE_FORMAT gcc)
+endmacro()
-- 
cgit v0.12