diff options
author | Craig Scott <craig.scott@crascit.com> | 2021-05-15 06:23:54 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2021-05-15 06:30:46 (GMT) |
commit | b20c1f4880aa7fb764f4e2a47b92fca846e84941 (patch) | |
tree | 449debef5943b01052bb8cd78e9335e311776355 /Help | |
parent | 639a6bd4c75740d339c8d28f5aba758a0fe11664 (diff) | |
download | CMake-b20c1f4880aa7fb764f4e2a47b92fca846e84941.zip CMake-b20c1f4880aa7fb764f4e2a47b92fca846e84941.tar.gz CMake-b20c1f4880aa7fb764f4e2a47b92fca846e84941.tar.bz2 |
Help: Make SHELL option examples more generic
Comments at the bottom of the docs for add_compile_options() and
target_compile_options() recommend using other commands if setting
compiler definitions. Change the examples we use for the SHELL:
functionality to use -option instead of -D so that we don't violate our
own recommendations. This also makes the examples more
appropriate for use with link options as well.
Tweak the wording to not specify the type of option being discussed.
This will already be clear from the page the text is included into and
it avoids naming unrelated option types for the given page.
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/OPTIONS_SHELL.txt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Help/command/OPTIONS_SHELL.txt b/Help/command/OPTIONS_SHELL.txt index 4051ffe..7f03f4e 100644 --- a/Help/command/OPTIONS_SHELL.txt +++ b/Help/command/OPTIONS_SHELL.txt @@ -1,11 +1,12 @@ -The final set of compile or link options used for a target is constructed by +The final set of options used for a target is constructed by accumulating options from the current target and the usage requirements of its dependencies. The set of options is de-duplicated to avoid repetition. .. versionadded:: 3.12 While beneficial for individual options, the de-duplication step can break - up option groups. For example, ``-D A -D B`` becomes ``-D A B``. One may - specify a group of options using shell-like quoting along with a ``SHELL:`` - prefix. The ``SHELL:`` prefix is dropped, and the rest of the option string - is parsed using the :command:`separate_arguments` ``UNIX_COMMAND`` mode. - For example, ``"SHELL:-D A" "SHELL:-D B"`` becomes ``-D A -D B``. + up option groups. For example, ``-option A -option B`` becomes + ``-option A B``. One may specify a group of options using shell-like + quoting along with a ``SHELL:`` prefix. The ``SHELL:`` prefix is dropped, + and the rest of the option string is parsed using the + :command:`separate_arguments` ``UNIX_COMMAND`` mode. For example, + ``"SHELL:-option A" "SHELL:-option B"`` becomes ``-option A -option B``. |