CMake/Modules/Compiler/PGI-Fortran.cmake
Daniel Carrera 4087d0ae85 PGI: Add support for Fortran with the Ninja generator
The PGI documentation says that `-Mpreprocess` "instructs the compiler
to perform cpp-like preprocessing on assembly and Fortran input source
files".  The `-E` flag causes the compiler to spit the result to stdout
instead of saving it to a file.
2016-12-16 08:33:21 -05:00

14 lines
458 B
CMake

include(Compiler/PGI)
__compiler_pgi(Fortran)
set(CMAKE_Fortran_PREPROCESS_SOURCE
"<CMAKE_Fortran_COMPILER> -Mpreprocess <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>")
set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform")
set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform")
string(APPEND CMAKE_Fortran_FLAGS_INIT " -Mpreprocess -Kieee")
string(APPEND CMAKE_Fortran_FLAGS_DEBUG_INIT " -Mbounds")
set(CMAKE_Fortran_MODDIR_FLAG "-module ")