ecbuild_target_flagsΒΆ

Override compiler flags for a given target.

ecbuild_target_flags( <target> <c_flags> <cxx_flags> <fortran_flags> )

Required arguments:

target

Target name

c_flags

Target specific C flags (can be empty)

cxx_flags

Target specific CXX flags (can be empty)

fortran_flags

Target specific Fortran flags (can be empty)

There are 3 cases, only the first applicable case takes effect:

  1. Use custom rules from user specified ECBUILD_COMPILE_FLAGS file and append target specific flags.

  2. Use JSON rules from user specified ECBUILD_SOURCE_FLAGS file and append target specific flags.

  3. Only the target specific flags are applied to all matching source files.