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.
This commit is contained in:
Daniel Carrera 2016-12-16 03:10:21 +01:00 committed by Brad King
parent 0a9e4e08b5
commit 4087d0ae85

View File

@ -1,6 +1,9 @@
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")