diff options
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/file.rst | 14 | ||||
-rw-r--r-- | Help/command/get_filename_component.rst | 5 |
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 |