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
- BUILDoptional
add flags to CMAKE_${lang}_FLAGS_<build> instead of CMAKE_${lang}_FLAGS
- NAMEoptional
name of the check (if omitted, checks are enumerated)
- NO_FAILoptional
do not fail if the flag cannot be added