diff options
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r-- | Modules/CMakeFortranCompilerId.F.in | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 6b51e38..0a3db4c 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) @@ -82,6 +96,23 @@ # define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) # define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) # endif +#elif defined(__NVCOMPILER) || defined(__NVCOMPILER_LLVM__) + PRINT *, 'INFO:compiler[NVHPC]' +# if defined(__NVCOMPILER_MAJOR__) +# define COMPILER_VERSION_MAJOR DEC(__NVCOMPILER_MAJOR__) +# else +# define COMPILER_VERSION_MAJOR DEC(__PGIC__) +# endif +# if defined(__NVCOMPILER_MINOR__) +# define COMPILER_VERSION_MINOR DEC(__NVCOMPILER_MINOR__) +# else +# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__) +# endif +# if defined(__NVCOMPILER_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__NVCOMPILER_PATCHLEVEL__) +# elif defined(__PGIC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) +# endif #elif defined(__PGI) PRINT *, 'INFO:compiler[PGI]' # define COMPILER_VERSION_MAJOR DEC(__PGIC__) |