summaryrefslogtreecommitdiffstats
path: root/Help/command/file.rst
Commit message (Collapse)AuthorAgeFilesLines
* file(REAL_PATH): resolve symlinks before '..' componentsRobert Maynard2023-07-201-0/+5
| | | | | | | | Previously REAL_PATH would collapse paths before resolving any symlinks so if `..` crossed a symlink the output from `REAL_PATH` would be wrong. It looked like REAL_PATH did this by mistake since it was a side-effect of ensuring we had an absolute path before resolving symlinks.
* file(GET_RUNTIME_DEPENDENCIES): Document case-preserving change on WindowsBrad King2023-03-271-9/+16
| | | | | | In commit fa45594407 (file(GET_RUNTIME_DEPENDENCIES): Preserve casing for Windows PE binaries, 2023-03-06) we neglected to update associated documentation.
* Help: Improve file command signaturesMatthew Woehlke2023-03-151-5/+5
| | | | | Fix a couple of file command signatures that were not using angle brackets to mark arguments.
* Help: Convert signatures of file commandMatthew Woehlke2023-03-151-926/+894
| | | | | | | | | | | | Convert `file` command to use new `signature` directive. Use '<HASH>' rather than 'HASH' for relevant signature targets, as this is arguably more correct, results in less need to specify explicit targets, but still produces '#hash' as the HTML anchor. Although actual textual changes to `file` are fairly minimal, large portions of the content have been re-indented and in many cases, re-flowed. Some tabular content in literal text blocks has also been converted to actual tables.
* Help:file: document HTTPHEADER morescivision2023-02-241-1/+8
| | | | | | Some servers have allow-lists for HTTP UserAgent for example. CMake project devs would benefit from this hint about setting authorization tokens and HTTP User Agent.
* file(COPY_FILE): Add option to retry on Windows if input access failsBrad King2022-11-171-1/+10
| | | | | | | | On Windows, a file may be inaccessible for a short time after it is created. This occurs for various reasons, including indexing, antivirus tools, and NTFS's asynchronous semantics. Add an `INPUT_MAY_BE_RECENT` option to tell CMake that the input file may have been recently created so that we can retry a few times to read it.
* file(ARCHIVE_CREATE): Allow higher compression level for ZstdAmir Masoud Abdol2022-11-161-0/+3
| | | | | | | | This allows the Zstd compression-level to be set between 0-19. I've adjusted some of the tests, and error messages to indicates the selected algorithm, and min/max of its compression-level. Fixes: #24160
* Help: Use direct refs to genexes instead of ``$<GENEX-NAME>``Alex Turbov2022-11-091-6/+7
|
* Help: Clarify file(DOWNLOAD) behavior for existing file with same hashMichael Hirsch2022-08-231-2/+5
|
* cmake -E tar: Add --touch optionKasper Laudrup2022-03-231-1/+6
| | | | | | | | Similar to GNU tar add a --touch option to the tar extract command to skip extracting the timestamps from the files in the archive effectively touching them as if they were just created. Issue: #22746
* file(DOWNLOAD): Add options to download a rangem.klimenko2022-02-151-0/+12
|
* Help: Fix file(INSTALL) docs w.r.t. CMAKE_INSTALL_MESSAGEArcturus Arcturus2021-10-201-2/+2
| | | | | | | | | In commit c9568de52c (install: Add CMAKE_INSTALL_MESSAGE variable (#13761), 2014-06-24, v3.1.0-rc1~370^2~1) we incorrectly documented that `CMAKE_INSTALL_MESSAGE` controls the status message for `file(INSTALL)`. Revert that. Fixes: #17162
* Help: Clean up how TLS and NETRC variables are discussedCraig Scott2021-10-041-10/+8
| | | | | | | | | | Mention of the fallback of the command options to the CMAKE_... variables was repeated in places. The wording was also a bit unclear about whether the fallback only occurred when neither TLS or neither NETRC option was given to the command. Move the fallback details directly to each relevant option instead. Also use cross-referencing to the variables where it was not linked previously.
* Help: Add documentation for CMAKE_TLS_CAINFOCraig Scott2021-10-041-2/+3
|
* Alternative symlink-creating mode for file(INSTALL ...)Felix Lelchuk2021-08-021-0/+5
| | | | | | | | | | | An new environment variable 'CMAKE_INSTALL_MODE' is introduced, which can be used to ask CMake to create symbolic links instead of copying files during a file(INSTALL ...). The operation is at the file level only, directory trees are still created using actual directories, not links. Signed-off-by: Felix Lelchuk <felix.lelchuk@gmx.de>
* Help: Expand details for file(COPY_FILE)Craig Scott2021-07-191-2/+18
|
* Help: Re-order file() sub-commands in Filesystem sectionCraig Scott2021-07-191-28/+28
| | | | | | | | | | | | The file(COPY_FILE) sub-command is closely related to the file(COPY) sub-command. Move the former to just before the latter for improved continuity. The file(RENAME) sub-command is also somewhat related to file(COPY_FILE), so it was also moved to keep it just before file(COPY_FILE). The file(MAKE_DIRECTORY) sub-command was also moved to just before the file(REMOVE) and file(REMOVE_RECURSE) sub-commands to keep them together and improve logical flow of operations.
* Help: Improve readability and accuracy of runtime deps-related contentCraig Scott2021-07-041-2/+4
| | | | | | Duplicated textual patterns are factored out to make the text more readable. The POST_INCLUDE_FILES and POST_EXCLUDE_FILES were also previously missing from the main syntax block for install(RUNTIME_DEPENDENCY_SET).
* Help: Add missing versionadded 3.21 for file(RENAME) optionsCraig Scott2021-07-031-0/+4
|
* Merge topic 'doc_regex'Brad King2021-06-031-1/+2
|\ | | | | | | | | | | | | 0d210b92fa Help: links to CMake regex syntax Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6179
| * Help: links to CMake regex syntaxMichael Hirsch2021-06-021-1/+2
| |
* | file(GET_RUNTIME_DEPENDENCIES): Add POST_{IN,EX}CLUDE_FILES argumentsKyle Edwards2021-06-011-8/+24
|/
* Help: Document CMAKE_TLS_VERIFY variable explicitlyMichael Hirsch2021-05-041-1/+1
| | | | | Previously it was mentioned only in the `file` and `ExternalProject` documentation.
* file(REAL_PATH): add option EXPAND_TILDEMarc Chevrier2021-04-211-5/+15
| | | | | This option enables the replacement of any leading tilde with the path to the user's home directory.
* Merge topic 'doc-if-IS_ABSOLUTE'Brad King2021-04-201-1/+2
|\ | | | | | | | | | | | | | | 6234afdff4 Help: Document special cases for if(IS_ABSOLUTE) 789307b02f Help: Behavior of file(TO_NATIVE_PATH) depends on the host platform Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6016
| * Help: Behavior of file(TO_NATIVE_PATH) depends on the host platformCraig Scott2021-04-171-1/+2
| |
* | Merge topic 'commands-file-permissions'Brad King2021-03-291-8/+18
|\ \ | |/ | | | | | | | | | | | | | | | | 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
| * Help: Clarify permission-related command optionsCraig Scott2021-03-261-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | file: add `COPY_FILE` subcommandBen Boeckel2021-03-101-0/+23
| | | | | | | | | | | | The `file(COPY)` subcommand is overloaded and busy for such a simple operation. Instead, make a simpler subcommand with error handling support.
* | file(RENAME): Add option to not replace existing pathBrad King2021-03-041-1/+7
| | | | | | | | | | Add a `NO_REPLACE` option that prevents overwriting `<newname>` if it exists.
* | file(RENAME): Add option to capture error message on failureBrad King2021-03-041-2/+9
|/
* Merge topic 'issue-19198'Brad King2021-02-021-1/+9
|\ | | | | | | | | | | | | | | 255df8622b file(GENERATE): Support new line style Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !5649
| * file(GENERATE): Support new line styleAsit Dhal2021-02-011-1/+9
| | | | | | | | Fixes: #19198
* | Added `SETUID` and `SETGID` to the list of accepted file permissionswilliam.r.dieter2021-01-291-1/+1
|/ | | | Signed-off-by: william.r.dieter <william.r.dieter@intel.com>
* file(GENERATE): Support options to manipulate file permissionsAsit Dhal2020-12-211-1/+14
| | | | Fixes: #15653
* Help: Fix grammar in `.. versionadded` directivesNikita Nemkin2020-12-021-1/+1
| | | | Issue: #19715
* Help: Replace some `versionadded` directives with `versionchanged`Nikita Nemkin2020-11-121-4/+4
| | | | | | | | `.. 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
* Help: Add `.. versionadded` directives to commands documentationNikita Nemkin2020-11-091-38/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Help: Cleanup typos and grammar for the 3.19 releaseCraig Scott2020-10-241-24/+27
|
* file(ARCHIVE_CREATE): Add option to control compression levelAsit Dhal2020-09-211-0/+5
| | | | Fixes: #21125
* file(): Add REAL_PATH sub-commandMarc Chevrier2020-09-081-0/+14
|
* cmake_path command: path managementMarc Chevrier2020-09-061-0/+15
| | | | Fixes: #19568, #20922
* file: Add CHMOD and CHMOD_RECURSE subcommandsSibi Siddharthan2020-08-261-0/+47
| | | | | | Fixes: #21057 Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
* file(GENERATE): Add TARGET argumentRaul Tambre2020-08-201-1/+5
| | | | | | | Adds TARGET argument to file(GENERATE) to make resolving generator expressions requiring a target possible. Implements #21101, fixes #21074.
* file(DOWNLOAD): Make file argument optionalKyle Edwards2020-07-271-5/+10
|
* Help: Update file(GET_RUNTIME_DEPENDENCIES) prose to match option namesBrad King2020-07-231-2/+2
|
* Help: Update file(ARCHIVE...) synopsis for renamed optionsCraig Scott2020-07-061-2/+2
| | | | | | | | | The FILES and DIRECTORY options were renamed in bbcff21f71 (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.
* Merge topic 'file-ARCHIVE-files-dirs' into release-3.18Brad King2020-07-011-14/+16
|\ | | | | | | | | | | | | bbcff21f71 file(ARCHIVE*): Collapse FILES and DIRECTORY options Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4955
| * file(ARCHIVE*): Collapse FILES and DIRECTORY optionsCraig Scott2020-06-301-14/+16
| | | | | | | | | | | | | | | | 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
* | Merge topic 'file-CONFIGURE-subdir' into release-3.18Brad King2020-06-301-2/+1
|\ \ | |/ |/| | | | | | | | | e5f5eeca2f file: Fix CONFIGURE output relative path Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4951