diff options
author | Daniel Carrera <dcarrera@gmail.com> | 2016-12-16 02:10:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-12-16 13:33:21 (GMT) |
commit | 4087d0ae85cd9835296a82e0d5a63db0feabcb93 (patch) | |
tree | 881eb272a03971db96020fd727f39d1c2d5e0401 /Modules/Compiler/PGI-Fortran.cmake | |
parent | 0a9e4e08b5d275fa20190509d6b1448f360461a8 (diff) | |
download | CMake-4087d0ae85cd9835296a82e0d5a63db0feabcb93.zip CMake-4087d0ae85cd9835296a82e0d5a63db0feabcb93.tar.gz CMake-4087d0ae85cd9835296a82e0d5a63db0feabcb93.tar.bz2 |
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.
Diffstat (limited to 'Modules/Compiler/PGI-Fortran.cmake')
-rw-r--r-- | Modules/Compiler/PGI-Fortran.cmake | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/Compiler/PGI-Fortran.cmake b/Modules/Compiler/PGI-Fortran.cmake index 3765079..4783424 100644 --- a/Modules/Compiler/PGI-Fortran.cmake +++ b/Modules/Compiler/PGI-Fortran.cmake @@ -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") |