summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2020-08-26 12:33:18 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2020-09-08 16:33:57 (GMT)
commitbe36266dabee16d17a4f2e71fa9d05f8ef4769ce (patch)
tree57d4da5efc5b6b4dc8837acb63dcb471fd8266b5 /Help/command
parent503d0f80e1ccafa8352145b1a733dd41751dcd7f (diff)
downloadCMake-be36266dabee16d17a4f2e71fa9d05f8ef4769ce.zip
CMake-be36266dabee16d17a4f2e71fa9d05f8ef4769ce.tar.gz
CMake-be36266dabee16d17a4f2e71fa9d05f8ef4769ce.tar.bz2
file(): Add REAL_PATH sub-command
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/file.rst14
-rw-r--r--Help/command/get_filename_component.rst5
2 files changed, 17 insertions, 2 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst
index f4a817e..d77ad2d 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -49,6 +49,7 @@ Synopsis
file(`CHMOD_RECURSE`_ <files>... <directories>... PERMISSIONS <permissions>... [...])
`Path Conversion`_
+ file(`REAL_PATH`_ <path> <out-var> [BASE_DIRECTORY <dir>])
file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
file({`TO_CMAKE_PATH`_ | `TO_NATIVE_PATH`_} <path> <out-var>)
@@ -806,6 +807,19 @@ the ``<directories>..`` recursively.
Path Conversion
^^^^^^^^^^^^^^^
+.. _REAL_PATH:
+
+.. code-block:: cmake
+
+ file(REAL_PATH <path> <out-var> [BASE_DIRECTORY <dir>])
+
+Compute the absolute path to an existing file or directory with symlinks
+resolved.
+
+If the provided ``<path>`` is a relative path, it is evaluated relative to the
+given base directory ``<dir>``. If no base directory is provided, the default
+base directory will be :variable:`CMAKE_CURRENT_SOURCE_DIR`.
+
.. _RELATIVE_PATH:
.. code-block:: cmake
diff --git a/Help/command/get_filename_component.rst b/Help/command/get_filename_component.rst
index 9d33a0a..e8c68b2 100644
--- a/Help/command/get_filename_component.rst
+++ b/Help/command/get_filename_component.rst
@@ -46,8 +46,9 @@ cache.
.. note::
- All previous sub-commands, except ``REALPATH``, has been superseded by
- :command:`cmake_path` command.
+ All previous sub-commands has been superseded by
+ :command:`cmake_path` command, except ``REALPATH`` now offered by
+ :ref:`file(REAL_PATH) <REAL_PATH>` command.
.. code-block:: cmake