diff options
author | Craig Scott <craig.scott@crascit.com> | 2021-07-19 22:38:49 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2021-07-19 22:39:34 (GMT) |
commit | c8ea886123711c3e47794bb1f297950333e4904c (patch) | |
tree | 1cbfae2ec9ccb3f3f6fafeea3758a8c54e1ab57a /Help/command | |
parent | b5a96716eb38e5859f10947e3d61bb4a8c0dffc0 (diff) | |
download | CMake-c8ea886123711c3e47794bb1f297950333e4904c.zip CMake-c8ea886123711c3e47794bb1f297950333e4904c.tar.gz CMake-c8ea886123711c3e47794bb1f297950333e4904c.tar.bz2 |
Help: Re-order file() sub-commands in Filesystem section
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.
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/file.rst | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst index 943bf7c..a9cbd40 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -38,10 +38,10 @@ Synopsis `Filesystem`_ file({`GLOB`_ | `GLOB_RECURSE`_} <out-var> [...] [<globbing-expr>...]) + file(`MAKE_DIRECTORY`_ [<dir>...]) + file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...]) file(`RENAME`_ <oldname> <newname> [...]) file(`COPY_FILE`_ <oldname> <newname> [...]) - file({`REMOVE`_ | `REMOVE_RECURSE`_ } [<files>...]) - file(`MAKE_DIRECTORY`_ [<dir>...]) file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...]) file(`SIZE`_ <filename> <out-var>) file(`READ_SYMLINK`_ <linkname> <out-var>) @@ -691,6 +691,32 @@ Examples of recursive globbing include:: /dir/*.py - match all python files in /dir and subdirectories +.. _MAKE_DIRECTORY: + +.. code-block:: cmake + + file(MAKE_DIRECTORY [<directories>...]) + +Create the given directories and their parents as needed. + +.. _REMOVE: +.. _REMOVE_RECURSE: + +.. code-block:: cmake + + file(REMOVE [<files>...]) + file(REMOVE_RECURSE [<files>...]) + +Remove the given files. The ``REMOVE_RECURSE`` mode will remove the given +files and directories, also non-empty directories. No error is emitted if a +given file does not exist. Relative input paths are evaluated with respect +to the current source directory. + +.. versionchanged:: 3.15 + Empty input paths are ignored with a warning. Previous versions of CMake + interpreted empty strings as a relative path with respect to the current + directory and removed its contents. + .. _RENAME: .. code-block:: cmake @@ -739,32 +765,6 @@ The options are: If the ``<newname>`` path already exists, do not replace it if it is the same as ``<oldname>``. Otherwise, an error is emitted. -.. _REMOVE: -.. _REMOVE_RECURSE: - -.. code-block:: cmake - - file(REMOVE [<files>...]) - file(REMOVE_RECURSE [<files>...]) - -Remove the given files. The ``REMOVE_RECURSE`` mode will remove the given -files and directories, also non-empty directories. No error is emitted if a -given file does not exist. Relative input paths are evaluated with respect -to the current source directory. - -.. versionchanged:: 3.15 - Empty input paths are ignored with a warning. Previous versions of CMake - interpreted empty string as a relative path with respect to the current - directory and removed its contents. - -.. _MAKE_DIRECTORY: - -.. code-block:: cmake - - file(MAKE_DIRECTORY [<directories>...]) - -Create the given directories and their parents as needed. - .. _COPY: .. _INSTALL: |