[CMake] overriding initial Fortran flags with PGI compiler

Steven Vancoillie steven.vancoillie at teokem.lu.se
Tue Feb 10 03:52:22 EST 2015


Hi,

we use custom compiler flags for the default build types and our
solution works fine. However, when using the PGI Fortran compiler,
some initial flags are set in the module that are always there:
(/usr/share/cmake-3.1/Modules/Compiler/PGI-Fortran.cmake)

set(CMAKE_Fortran_FLAGS_INIT "${CMAKE_Fortran_FLAGS_INIT} -Mpreprocess -Kieee")

What should I do if I don't want those flags? It seems to me that this
should be tied to a certain build type?

Because of those general initial flags, it is e.g. pointless to use an
empty build type with custom flags, as the "-Mpreprocess -Kieee" will
always be there.

Steven


More information about the CMake mailing list