• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1CMAKE_<LANG>_FLAGS
2------------------
3
4Flags for all build types.
5
6``<LANG>`` flags used regardless of the value of :variable:`CMAKE_BUILD_TYPE`.
7
8This is initialized for each language from environment variables:
9
10* ``CMAKE_C_FLAGS``:
11  Initialized by the :envvar:`CFLAGS` environment variable.
12* ``CMAKE_CXX_FLAGS``:
13  Initialized by the :envvar:`CXXFLAGS` environment variable.
14* ``CMAKE_CUDA_FLAGS``:
15  Initialized by the :envvar:`CUDAFLAGS` environment variable.
16* ``CMAKE_Fortran_FLAGS``:
17  Initialized by the :envvar:`FFLAGS` environment variable.
18
19This value is a command-line string fragment. Therefore, multiple options
20should be separated by spaces, and options with spaces should be quoted.
21
22The flags in this variable will be passed to the compiler before those
23in the per-configuration :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` variant,
24and before flags added by the :command:`add_compile_options` or
25:command:`target_compile_options` commands.
26