summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerId.F.in
diff options
context:
space:
mode:
authorIsuru Fernando <isuruf@gmail.com>2017-10-31 00:51:23 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-31 12:47:06 (GMT)
commit72d27964b92ddb4d8ee85e32a27d0e56d642ec1c (patch)
tree135c28e5803ad84dda1b343c49c0255c4b4c4aab /Modules/CMakeFortranCompilerId.F.in
parent41d796be155e0da8fec66cb281429ed0eb91650d (diff)
downloadCMake-72d27964b92ddb4d8ee85e32a27d0e56d642ec1c.zip
CMake-72d27964b92ddb4d8ee85e32a27d0e56d642ec1c.tar.gz
CMake-72d27964b92ddb4d8ee85e32a27d0e56d642ec1c.tar.bz2
Flang: Identify as simulating MSVC on Windows
In `CMakeFortranCompilerId.F.in`, take the `_MSC_VER` out of the Intel-specific block so it will trigger for other compilers like Flang. In `Compiler/Clang.cmake`, switch off Fortran too.
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in41
1 files changed, 20 insertions, 21 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 49789f1..da3d953 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -2,6 +2,26 @@
#if 0
! Identify the compiler
#endif
+#if defined(_MSC_VER)
+ PRINT *, 'INFO:simulate[MSVC]'
+# if _MSC_VER >= 1900
+ PRINT *, 'INFO:simulate_version[019.00]'
+# elif _MSC_VER >= 1800
+ PRINT *, 'INFO:simulate_version[018.00]'
+# elif _MSC_VER >= 1700
+ PRINT *, 'INFO:simulate_version[017.00]'
+# elif _MSC_VER >= 1600
+ PRINT *, 'INFO:simulate_version[016.00]'
+# elif _MSC_VER >= 1500
+ PRINT *, 'INFO:simulate_version[015.00]'
+# elif _MSC_VER >= 1400
+ PRINT *, 'INFO:simulate_version[014.00]'
+# elif _MSC_VER >= 1310
+ PRINT *, 'INFO:simulate_version[013.01]'
+# else
+ PRINT *, 'INFO:simulate_version[013.00]'
+# endif
+#endif
#if defined(__INTEL_COMPILER) || defined(__ICC)
PRINT *, 'INFO:compiler[Intel]'
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
@@ -14,27 +34,6 @@
# 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 >= 1900
- PRINT *, 'INFO:simulate_version[019.00]'
-# elif _MSC_VER >= 1800
- PRINT *, 'INFO:simulate_version[018.00]'
-# elif _MSC_VER >= 1700
- PRINT *, 'INFO:simulate_version[017.00]'
-# elif _MSC_VER >= 1600
- PRINT *, 'INFO:simulate_version[016.00]'
-# elif _MSC_VER >= 1500
- PRINT *, 'INFO:simulate_version[015.00]'
-# elif _MSC_VER >= 1400
- PRINT *, 'INFO:simulate_version[014.00]'
-# elif _MSC_VER >= 1310
- PRINT *, 'INFO:simulate_version[013.01]'
-# else
- PRINT *, 'INFO:simulate_version[013.00]'
-# endif
-# endif
#elif defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]'
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8)