summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/PGI-Fortran.cmake
diff options
context:
space:
mode:
authorDaniel Carrera <dcarrera@gmail.com>2016-12-16 02:10:21 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-16 13:33:21 (GMT)
commit4087d0ae85cd9835296a82e0d5a63db0feabcb93 (patch)
tree881eb272a03971db96020fd727f39d1c2d5e0401 /Modules/Compiler/PGI-Fortran.cmake
parent0a9e4e08b5d275fa20190509d6b1448f360461a8 (diff)
downloadCMake-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.cmake3
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")