Commit Graph

17 Commits

Author SHA1 Message Date
Brad King
561ae21f40 Help: Clarify that {add,target}_compile_options are not used for linking
Link to alternatives that can be used for adding link options.

Issue: #24662
2023-03-31 11:30:51 -04:00
Brad King
f93b13151e Help: Link to COMPILE_LANGUAGE genex from add_compile_options
Follow-up commit e2830cf16b (Help: Link to COMPILE_LANGUAGE genex
from target_compile_options, 2023-03-28).

Issue: #24639
2023-03-31 11:01:13 -04:00
Michael Hirsch
f03a1833e2
Help: Update compiler-specific add_compile_options() example and prose
Avoid hard-coding a warning-as-error flag now that CMake offers a
first class abstraction for that.

Also mention some relevant generator expressions which can be used
to provide even more specific targeting with language-specific flags.

Fixes: #24200
2022-11-29 09:12:17 +11:00
Alex Turbov
d4d1f85297
Help: Move a note about arguments and genexes into include file 2022-11-09 23:52:30 +04:00
Alex Turbov
65457e4fae
Help: Add _See Also_ sections to related CMake commands 2022-11-09 23:52:30 +04:00
Joachim Wuttke (h)
448e2d7a9d Help: Provide cross-references between compiler settings 2020-05-14 22:17:10 +02:00
Joachim Wuttke (h)
2439d546c8 Help: Revise compile options command docs, and provide example
For add_compile_options and target_compile_options:
- Insert sections.
- Provide cross-links between the two doc pages
- Alleviate and explain links to the commands
  ...compile_definitions and ...include_directories.
- Alleviate link to COMPILE_OPTIONS, and integrate it into
  the synopsis.
2018-12-20 10:45:49 +01:00
Joachim Wuttke (o)
adbaadf0ee Help: Apply syntax highlighting to project commands
* Replace most "::" by ".. code-block:: cmake"
  * Header sentence in imperative voice,
    detailed command description in present tense.
2018-10-25 13:47:31 +02:00
Marc Chevrier
c1f5a44b28 LINK_OPTIONS: Add new family of properties
This family enable to manage link flags

Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS

Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties

Fixes: #16543
2018-06-06 17:22:39 +02:00
Marc Chevrier
cb83314e65 add_compile_definitions: add new command
This command manages preprocessor definitions at directory level and
supports generator expressions.

Fixes: #15374
2018-04-20 09:28:13 -04:00
Brad King
ce0b983216 target_compile_options: Add syntax to specify shell strings
Options specified via `COMPILE_OPTIONS` and `INTERFACE_COMPILE_OPTIONS`
are deduplicated, but individual options can legitimately be duplicated
when grouped with other options, e.g.

    -D A -D B

After deduplication that becomes `-D A B`.  Therefore we need a way to
treat groups of options as units during deduplication.  A simple approach
is to specify each group as one option, e.g.

    "-D A" "-D B"

However, that conflicts with options that legitimately have spaces.  To
break this ambiguity, add a `SHELL:` prefix syntax to specify that an
option should be parsed like shell command line arguments after
deduplication, e.g.

    "SHELL:-D A" "SHELL:-D B"

These will survive deduplication intact, and then be parsed to produce
`-D A -D B` on the final command line.

Fixes: #15826
2018-03-14 11:10:25 -04:00
Brad King
a9f8c50aa2 Help: Clarify add_compile_options documentation (#15225)
Explain that it affects only targets added after the call.  Fix the link
to the COMPILE_OPTIONS directory propert documentation.  Update the
latter to explain that it is used to initialize the corresponding target
property when a target is created.
2014-10-29 09:18:56 -04:00
Stephen Kelly
96eb97f89e Help: Fix whitespace in doc link. 2014-05-20 16:44:06 +02:00
Stephen Kelly
ba4c2fa8fd Help: Mark up the buildsystem commands documentation
Cross-link to the cmake-buildsystem manual.
2014-02-06 16:15:53 -05:00
Stephen Kelly
85a4fad78c Help: Use `inline-literals` to mark generator expressions. 2014-02-06 16:15:52 -05:00
Brad King
e7ca48f226 Help: Factor out cmake-generator-expressions manual page
Generator expressions are supported in many places and are a distinct
concept worthy of their own manual page.  The old builtin documentation
was previously represented by preprocessor macros to generate it into
each place that supports them.  Factor out the duplicate content into a
dedicated cmake-generator-expressions manual page and reference it from
each original location.
2013-10-16 09:22:38 -04:00
Kitware Robot
f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00