mirror of
https://github.com/Kitware/CMake.git
synced 2026-07-02 20:57:29 +00:00
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.
This commit is contained in:
committed by
Brad King
parent
41d796be15
commit
72d27964b9
@@ -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)
|
||||
|
||||
@@ -11,7 +11,8 @@ set(__COMPILER_CLANG 1)
|
||||
include(Compiler/CMakeCommonCompilerMacros)
|
||||
|
||||
if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC"
|
||||
OR "x${CMAKE_Fortran_SIMULATE_ID}" STREQUAL "xMSVC")
|
||||
macro(__compiler_clang lang)
|
||||
endmacro()
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user