diff options
author | Tin Huynh <ahuynh@nvidia.com> | 2017-08-05 00:50:09 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-08-31 19:24:59 (GMT) |
commit | 2f3a07a981edfbc325f19ea252003e9da59dbcf5 (patch) | |
tree | 6ca31c90c90ddec49fde7009262775dc16078cfa /Modules/CMakeFortranCompilerId.F.in | |
parent | 9bad65940c87f594a5f1007019d4b187068dbce0 (diff) | |
download | CMake-2f3a07a981edfbc325f19ea252003e9da59dbcf5.zip CMake-2f3a07a981edfbc325f19ea252003e9da59dbcf5.tar.gz CMake-2f3a07a981edfbc325f19ea252003e9da59dbcf5.tar.bz2 |
Flang: Add support for flang Fortran compiler
flang is a Fortran compiler built on top of clang [1]. Because flang
shares a lot of commonalities with clang, the flang module piggybacks
off the clang module and overrides certain options.
Add flang to Fortran compiler auto find list.
Update flang preprocessor macros to differentiate from PGI.
Add Flang-FindBinUtils.
[1] https://github.com/flang-compiler/flang
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r-- | Modules/CMakeFortranCompilerId.F.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 26b2ed6..49789f1 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -90,6 +90,13 @@ # if defined(__PGIC_PATCHLEVEL__) # define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__) # endif +#elif defined(__FLANG) + PRINT *, 'INFO:compiler[Flang]' +# define COMPILER_VERSION_MAJOR DEC(__FLANG_MAJOR__) +# define COMPILER_VERSION_MINOR DEC(__FLANG_MINOR__) +# if defined(__FLANG_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__FLANG_PATCHLEVEL__) +# endif #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) PRINT *, 'INFO:compiler[MIPSpro]' # if 0 |