mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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
13 lines
395 B
CMake
13 lines
395 B
CMake
include(Compiler/Clang)
|
|
__compiler_clang(Fortran)
|
|
|
|
set(CMAKE_Fortran_PREPROCESS_SOURCE
|
|
"<CMAKE_Fortran_COMPILER> -cpp <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> -o <PREPROCESSED_SOURCE>")
|
|
|
|
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-ffixed-form")
|
|
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-ffree-form")
|
|
|
|
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -fbounds-check")
|
|
|
|
set(CMAKE_Fortran_MODDIR_FLAG "-J")
|