summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerId.F.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-17 18:26:14 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-19 14:26:27 (GMT)
commit2e09c4230f601ef5d744a2e43643e214a149ba39 (patch)
tree4cd1ece7bfbd748858da966235f9bb4af8e1bdd7 /Modules/CMakeFortranCompilerId.F.in
parente6ebc814dfa022680038a3855eb1eee56f6015f0 (diff)
downloadCMake-2e09c4230f601ef5d744a2e43643e214a149ba39.zip
CMake-2e09c4230f601ef5d744a2e43643e214a149ba39.tar.gz
CMake-2e09c4230f601ef5d744a2e43643e214a149ba39.tar.bz2
Fortran: Detect Intel compiler version
Port logic from the "Compiler/Intel-DetermineCompiler" module into "CMakeFortranCompilerId.F.in".
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 955ca85..956576d 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -4,6 +4,17 @@
#endif
#if 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)
+# if defined(__INTEL_COMPILER_UPDATE)
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
+# else
+# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
+# endif
+# if defined(__INTEL_COMPILER_BUILD_DATE)
+# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
+# endif
+
# if defined(_MSC_VER)
PRINT *, 'INFO:simulate[MSVC]'
# if _MSC_VER >= 1800