ecbuild_add_c_flags

Add C compiler flags to CMAKE_C_FLAGS only if supported by the compiler.

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

Options

BUILDoptional

add flags to CMAKE_C_FLAGS_<build> instead of CMAKE_C_FLAGS

NAMEoptional

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

NO_FAILoptional

do not fail if the flag cannot be added