Commit Graph

21 Commits

Author SHA1 Message Date
Brad King
682a513bbb Help: Organize configure_file documentation into sections 2024-01-26 10:29:57 -05:00
Torsten Rasmussen
b2b97d015e Help: configure_file: add $CACHE{VAR} and $ENV{VAR} to description
The configure_file(...) and string(CONFIGURE ...) functions also
substitutes variables of the form: $CACHE{VAR} and $ENV{VAR}.

Therefore add this information to the help documentation so that this
behavior is described to users
2023-05-22 12:46:04 -04:00
Robert Maynard
c89d467bf2 Help: configure_file doc example use target_include_directories
Fixes #24351
2023-01-25 12:30:15 -05:00
Gustaf Borgström
b64a69b6c4 Help: Fix typo in configure_file docs 2023-01-11 16:32:35 -05:00
Alex Turbov
65457e4fae
Help: Add _See Also_ sections to related CMake commands 2022-11-09 23:52:30 +04:00
Marc Aldorasi
fa47e9c8f9 Help: Document that configure_file can create directories 2021-10-28 12:48:25 -04:00
Brad King
75dd9b6c97 Merge topic 'commands-file-permissions'
769ff05483 Help: Clarify permission-related command options
900184616a Cleanup: Fix misspelt name of local C++ variable
635431a0c9 Tests: Check host platform instead of target for running stat
4ceb0ca59e Tests: Remove redundant files for configure_file() tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5945
2021-03-29 09:32:09 -04:00
Craig Scott
769ff05483 Help: Clarify permission-related command options
The previous docs did not make clear that at most only one of the three
permissions-related options can be given for configure_file() or
file(GENERATE) and that USE_SOURCE_PERMISSIONS is already the
default behavior for these commands.

Use consistent wording to refer to the input and output files for
configure_file().

Add missing "versionadded" directives on some of these keywords.

Use the consistent wording and keyword ordering between the
configure_file(), file(GENERATE) and file(COPY) commands.
2021-03-27 09:54:27 +11:00
Elsie Hupp
c13f75982f Help: Clarify configure_file #cmakedefine01 syntax and behavior
Fixes: #21935
2021-03-15 09:15:08 -04:00
Nikita Nemkin
c705279bae Help: Add .. versionadded directives to commands documentation
This change ony concerns directives that appear in the document body.

The guidelines for inserting version directives:

 * Baseline version is CMake 3.0, i.e. directives start at 3.1.
 * Always use `.. versionadded::` directive, avoid ad-hoc version
   references. Exception: policy pages.
 * For new command signatures, put `versionadded` on a separate line
   after the signature.
 * For a group of new signatures in a new document section,
   a single version note at the beginning of the section is sufficient.
 * For new options, put `versionadded` on a separate line before
   option description.
 * If all the option descriptions in the list are short one-liners,
   it's fine to put `versionadded` on the same line as the description.
 * If multiple option descriptions in close proximity would have
   the same ..versionadded directive, consider adding a single
   directive after the list, mentioning all added options.
 * For compact value lists and sub-option lists, put a single
  `versionadded` directive after the list mentioning all additions.
 * When a change is described in a single paragraph, put
   `versionadded` into that paragraph.
 * When only part of the paragraph has changed, separate the changed
   part if it doesn't break the flow. Otherwise, write a follow-up
   clarification paragraph and apply version directive to that.
 * When multiple version directives are close by, order earlier
   additions before later additions.
 * Indent related lists and code blocks to include them in the scope
   of `versionadded` directive.

Issue: #19715
2020-11-09 20:51:57 +05:00
Brad King
c79e02c4c3 Merge topic 'cmake-20866'
03ad0e61c1 configure_file: Add option for user defined permissions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5320
2020-10-27 07:11:13 -04:00
Craig Scott
95c14579f2 Help: Cleanup typos and grammar for the 3.19 release 2020-10-24 22:58:42 +11:00
Asit Dhal
03ad0e61c1 configure_file: Add option for user defined permissions
User defined permissions and options to copy permissions are
implemented.

Fixes: #20866
2020-10-24 12:00:47 +02:00
Rahul Gottipati
27b03281e2 configure_file: Add option to control file permissions transfer to copy
Issue: #20866
2020-06-30 11:20:41 -04:00
Joachim Wuttke (l)
c2efb3efcd Help: Revise docs on Scripting Commands
Revise docs for all "Scripting Commands", except four find_XXX
that use a macro suite of their own.

* Take full advantage of the improved syntax highlighting.
* Make consequential use of <..> placeholders.
* Clarify things here and there in the text.

Specific improvements to some command docs:

* "math": Correct description of novel hexadecimal capability.
* "if", "foreach", "while": Provide link to "endif" etc
* "foreach", "while": Mention "break" and "continue".
* "foreach": Simplify explanation of ``RANGE`` and ``IN`` signatures;
   advise against negative arguments or reverse ranges (compare issue #18461)
* "endif", "endfunction" etc: Explain that the argument is optional and
   maintained for compatibility only
2018-10-23 15:12:10 +02:00
Brad King
59e52b3041 Merge topic 'doc_configure_file'
c7d81e16 Help: Explicitly state that some file generations are lazy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1025
2017-07-11 07:35:27 -04:00
Sylvain Joubert
c7d81e16cb Help: Explicitly state that some file generations are lazy
Fixes: #16856
2017-07-07 15:46:35 +02:00
Sylvain Joubert
58f4744821 configure_file: Add support for indented cmakedefine
Optional spaces and/or tabs are now understood between the '#' character
and the 'cmakedefine'/'cmakedefine01' words. This indentation is
preserved in the output lines.

Fixes: #13037
2017-07-04 12:00:02 +02:00
Brad King
029d38fa61 Help: Revise configure_file documentation (#15403)
Format the documentation with better reST markup.  Revise the
wording to clarify how relative paths are handled.  Also add
an example section.
2015-02-12 16:20:32 -05:00
Brad King
441f2808ec Help: Fix reStructuredText syntax in auto-generated documents 2013-10-15 14:12:49 -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