From 4087d0ae85cd9835296a82e0d5a63db0feabcb93 Mon Sep 17 00:00:00 2001 From: Daniel Carrera Date: Fri, 16 Dec 2016 03:10:21 +0100 Subject: 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. --- Modules/Compiler/PGI-Fortran.cmake | 3 +++ 1 file changed, 3 insertions(+) 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 + " -Mpreprocess -E > ") + set(CMAKE_Fortran_FORMAT_FIXED_FLAG "-Mnofreeform") set(CMAKE_Fortran_FORMAT_FREE_FLAG "-Mfreeform") -- cgit v0.12