ecbuild_add_lang_flags

This is mostly an internal function of ecbuild, wrapped by the macros ecbuild_add_c_flags, ecbuild_add_cxx_flags and ecbuild_add_fortran_flags.

Add compiler flags to the CMAKE_${lang}_FLAGS only if supported by compiler.

ecbuild_add_lang_flags( <flag1> [ <flag2> ... ]
                       LANG [C|CXX|Fortran]
                       [ BUILD <build> ]
                       [ NAME <name> ]
                       [ NO_FAIL ] )

Options

LANG:
define the language to add the flag too
BUILD : optional
add flags to CMAKE_${lang}_FLAGS_<build> instead of CMAKE_${lang}_FLAGS
NAME : optional
name of the check (if omitted, checks are enumerated)
NO_FAIL : optional
do not fail if the flag cannot be added