Merge topic 'compile-options-order'

8f68bcad8f Tests: Add cases verifying flag ordering rules
ccc83ce162 Help: Document order of flags from CMAKE_<LANG>_FLAGS and COMPILE_OPTIONS
df79fe055b Help: Remove incorrect "versionadded" for CMAKE_<LANG>_FLAGS_<CONFIG>
c48d2d8480 VS: Place per-source preprocessor definitions after target-wide ones

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6187
This commit is contained in:
Brad King
2021-06-08 12:04:11 +00:00
committed by Kitware Robot
15 changed files with 132 additions and 19 deletions

View File

@@ -18,3 +18,8 @@ This is initialized for each language from environment variables:
This value is a command-line string fragment. Therefore, multiple options
should be separated by spaces, and options with spaces should be quoted.
The flags in this variable will be passed to the compiler before those
in the per-configuration :variable:`CMAKE_<LANG>_FLAGS_<CONFIG>` variant,
and before flags added by the :command:`add_compile_options` or
:command:`target_compile_options` commands.

View File

@@ -1,6 +1,9 @@
CMAKE_<LANG>_FLAGS_<CONFIG>
---------------------------
.. versionadded:: 3.11
Flags for language ``<LANG>`` when building for the ``<CONFIG>`` configuration.
The flags in this variable will be passed to the compiler after those
in the :variable:`CMAKE_<LANG>_FLAGS` variable, but before flags added
by the :command:`add_compile_options` or :command:`target_compile_options`
commands.