71 Commits

Author SHA1 Message Date
w00657280 c8bc56b0c6 fix:update cmake to 3.28.2
Signed-off-by: w00657280 <wuyuechang3@huawei.com>
2024-06-06 10:57:34 +08:00
Craig Scott 6b0fe6c283 Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform 2021-04-17 19:41:53 +10:00
Craig Scott 60aab21f3a 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
Brad King fc883bd630 Merge topic 'issue-19198'
be49c28361 file(GENERATE): Support new line style

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5649
2021-02-02 08:53:07 -05:00
Asit Dhal be49c28361 file(GENERATE): Support new line style
Fixes: #19198
2021-02-01 01:38:19 +01:00
william.r.dieter 241b88770e Added SETUID and SETGID to the list of accepted file permissions
Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
2021-01-29 16:30:52 -05:00
Asit Dhal 4693cb8038 file(GENERATE): Support options to manipulate file permissions
Fixes: #15653
2020-12-21 12:16:16 +01:00
Nikita Nemkin f6cc616578 Help: Fix grammar in .. versionadded directives
Issue: #19715
2020-12-02 21:00:31 +05:00
Nikita Nemkin 10e97620f1 Help: Replace some versionadded directives with versionchanged
`.. versionchanged` directive might be more appropriate when
documentation refers to previous CMake version, old behavior
or a policy, and there's no new parameter or a variable involved.

Issue: #19715
2020-11-12 09:44:01 +05:00
Nikita Nemkin ccc07c7f17 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
Craig Scott 34a644a7e0 Help: Cleanup typos and grammar for the 3.19 release 2020-10-24 22:58:42 +11:00
Asit Dhal 719c2f86e3 file(ARCHIVE_CREATE): Add option to control compression level
Fixes: #21125
2020-09-21 13:08:11 -04:00
Marc Chevrier 2e6c80d452 file(): Add REAL_PATH sub-command 2020-09-08 18:33:57 +02:00
Marc Chevrier bb15fe3635 cmake_path command: path management
Fixes: #19568, #20922
2020-09-06 10:52:25 +02:00
Sibi Siddharthan c7c4d6703b file: Add CHMOD and CHMOD_RECURSE subcommands
Fixes: #21057

Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
2020-08-26 21:22:50 +05:30
Raul Tambre 19889028d1 file(GENERATE): Add TARGET argument
Adds TARGET argument to file(GENERATE) to make resolving generator expressions
requiring a target possible.

Implements #21101, fixes #21074.
2020-08-20 17:41:52 +03:00
Kyle Edwards 4736ab6f6b file(DOWNLOAD): Make file argument optional 2020-07-27 11:26:50 -04:00
Brad King 2936926a1e Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option names 2020-07-23 13:47:24 -04:00
Craig Scott d5578655c4 Help: Update file(ARCHIVE...) synopsis for renamed options
The FILES and DIRECTORY options were renamed in e9d2f06800
(file(ARCHIVE*): Collapse FILES and DIRECTORY options, 2020-06-30), 
but the synopsis part of the file() documentation was missed.
The synopsis also typically only shows the mandatory options.
Update the synopsis to reflect the name changes and omit the
DESTINATION option since it is not mandatory.
2020-07-06 20:15:09 +10:00
Brad King fdacbbf6c4 Merge topic 'file-ARCHIVE-files-dirs' into release-3.18
e9d2f06800 file(ARCHIVE*): Collapse FILES and DIRECTORY options

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4955
2020-07-01 07:00:42 -04:00
Brad King c78a9ed810 Merge topic 'file-CONFIGURE-subdir' into release-3.18
141ed4e1a1 file: Fix CONFIGURE output relative path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4951
2020-06-30 08:04:07 -04:00
Craig Scott e9d2f06800 file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS 
to more accurately describe the way the options are used.

Fixes: #20884
2020-06-30 22:01:35 +10:00
Brad King 141ed4e1a1 file: Fix CONFIGURE output relative path
In commit b16750f2d2 (file: Add CONFIGURE subcommand, 2020-03-06,
v3.18.0-rc1~584^2) we accidentally treated relative path outputs
with respect to the current working directory.  Treat them with
respect to the current binary directory instead.

Fixes: #20885
2020-06-29 09:20:42 -04:00
Craig Scott 75232c3f5a file(ARCHIVE_CREATE): Rename TYPE option to COMPRESSION
Fixes: #20883
2020-06-27 18:38:28 +10:00
Craig Scott 5031f4904a Help: Fix contents indenting for file(ARCHIVE_...) subcommands 2020-06-27 16:33:29 +10:00
Harry Mallon 2a5d030698 file(UPLOAD): Add support for TLS_VERIFY and TLS_CAINFO
* Improve and test err messages when TLS_VERIFY and TLS_CAINFO
  are not set in file(DOWNLOAD) and file(UPLOAD).
2020-04-08 15:15:49 +01:00
Robert Maynard a02cdc0523 file: GetRuntimeDependencies use CMAKE_OBJDUMP when applicable
On machines where the gnu bin utils are prefixed, or suffixed
the file(GET_RUNTIME_DEPENDENCIES ) command would fail without
explicitly setting the location of objdump.

Now we pre-populate the variables used to find objdump based
on the gnu bin utils, so that these use cases are better supported
2020-04-06 12:12:14 -04:00
Cristian Adam e093d41d4b file: Add ARCHIVE_{CREATE|EXTRACT} subcommands
Fixes: #20443
2020-03-16 14:33:27 +01:00
Leander Beernaert b16750f2d2 file: Add CONFIGURE subcommand
Extend the `file()` command with a new `CONFIGURE` subcommand that
behaves the same as `string(CONFIGURE)` except that it writes the
resulting output immediately to a file.

Fixes: #20388
2020-03-09 11:54:02 -04:00
Kyle Edwards 24658f4890 Help: Make note that file(READ ... HEX) produces lowercase letters 2020-02-19 09:11:15 -05:00
Shane Parris 1ff075d4cd file: Fix GLOB_RECURSE LIST_DIRECTORIES documentation regarding CMP0009 2020-02-11 08:45:35 -05:00
Craig Scott 999a894e73 Help: Typo and grammar fixes for file(GET_RUNTIME_DEPENDENCIES)
Note that ``MODULE`` s was rendering strangely, so the wording
has been tweaked to avoid needing to specify ``MODULE`` as a
plural word. Modules are still libraries, so it is okay to call them as
such where it doesn't cause any ambiguity.
2019-11-03 22:44:36 +11:00
Marc Chevrier d96d6c318c Help: Fix spelling error in file(GET_RUNTIME_DEPENDENCIES) docs 2019-10-30 13:49:54 -04:00
Steve Mokris e382e8c814 Help: Mention file(GLOB)'s case-sensitivity
Based on the KWSYS_GLOB_CASE_INDEPENDENT flag in `Source/kwsys/Glob.cxx`.
2019-07-10 09:29:29 -04:00
Kyle Edwards 08d50a0b85 file: Add GET_RUNTIME_DEPENDENCIES mode
Co-Authored-by: Bryon Bean <bryon.bean@kitware.com>
2019-06-10 14:35:28 -04:00
Brad King cdea7168c8 file: Change REMOVE to ignore empty names
Previously code like

    file(REMOVE_RECURSE "${accidentally_missing_variable}")

treated the empty string as a relative path with respect to the
current directory and removed its contents.  Change this behavior
to ignore the empty string with a warning instead.

Normally such behavior changes are done with a policy, but in this case
such code is likely a real bug in project code that can delete data.

Fixes: #19274
2019-05-21 09:25:32 -04:00
Kyle Edwards 6ca2e6059b file(INSTALL): Add FOLLOW_SYMLINK_CHAIN argument 2019-05-16 15:25:33 -04:00
Craig Scott aec15a50ec Help: Clarify and improve readability of link-related file subcommands 2019-02-16 20:55:49 +11:00
Tushar Maheshwari f3225e223b Help: Add documentation for file(CREATE_LINK) subcommand 2019-01-16 10:03:35 -05:00
Kyle Edwards d989a39e9c file: Add READ_SYMLINK sub-command 2018-12-06 10:11:51 -05:00
Wouter Klouwen d9fb6b44f6 file: add SIZE option
This commit adds the SIZE option to file(). It returns the file size of
the given path if it exists and produces an error if not.
2018-11-27 08:50:36 +00:00
Joachim Wuttke (l) 82170fc5f8 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 168f1616ea Help: Organize file command docs into sections
Add a synopsis section at the top summarizing all signatures.

Issue: #17948
2018-05-07 10:10:37 -04:00
Brad King 921990e783 Help: Re-order file command docs
Prepare for the addition of section headers for grouping commands.
2018-05-07 10:10:37 -04:00
Shane Parris 3cb2bf28d0 Adjust help documentation for file(GLOB), add topic notes 2018-04-01 23:16:13 -04:00
Shane Parris bdc564e761 Adds file(TOUCH) and file(TOUCH_NOCREATE) sub-commands 2018-02-15 10:54:18 -05:00
luzpaz d74deb9cc0 Fix trivial typos in text
Some are user facing.

Found using

    codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt`

whereby the whitelist contained:

    ans
    dum
    helpfull
    emmited
    emmitted
    buil
    iff
    isnt
    nto
    ot
    pathes
    substract
    te
    todays
    upto
    whitespaces
2017-11-03 10:25:05 -04:00
Shane Parris 09723b47f7 file(DOWNLOAD|UPLOAD): Add 'NETRC' and 'NETRC_FILE' suboption 2017-10-18 15:21:42 -04:00
Brad King b02a71b502 Merge topic 'file_WRITE_docs'
b7adfe55 file: Clarify directory creation behavior when using WRITE

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1088
2017-08-04 09:16:46 -04:00
Robert Dailey b7adfe5559 file: Clarify directory creation behavior when using WRITE
When using `file(WRITE)`, parent directories are also created. Documentation
has been updated to explain this behavior.

Co-Author: Craig Scott <craig.scott@crascit.com>
2017-08-03 14:11:26 -04:00