ecbuild_add_fortran_flags

Add Fortran compiler flags to CMAKE_Fortran_FLAGS only if supported by the compiler.

ecbuild_add_fortran_flags( <flag1> [ <flag2> ... ]
                           [ BUILD <build> ]
                           [ NAME <name> ]
                           [ NO_FAIL ]
                           [ PROJECT ] )

Options

BUILDoptional

add flags to CMAKE_Fortran_FLAGS_<build> instead of CMAKE_Fortran_FLAGS

NAMEoptional

name of the check (if omitted, checks are enumerated)

NO_FAILoptional

do not fail if the flag cannot be added

PROJECToptional

add flags to project specific ${PNAME}_Fortran_FLAGS and ${PNAME}_Fortran_FLAGS_<build> instead of the corresponding CMAKE_Fortran_FLAGS variables.