This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  566652b0c8ffe6896d3d3ae1cafd58dddd34eecd (commit)
       via  0f5a9f7934913935d632fc596ba1b585aa10fa29 (commit)
      from  0923246b2e2fb5be0d2fa1b256879a326aeee13b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=566652b0c8ffe6896d3d3ae1cafd58dddd34eecd
commit 566652b0c8ffe6896d3d3ae1cafd58dddd34eecd
Merge: 0923246 0f5a9f7
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Mon Feb 18 15:22:27 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Mon Feb 18 10:22:35 2019 -0500

    Merge topic 'file_symlink_docs'
    
    0f5a9f7934 Help: Clarify and improve readability of link-related file 
subcommands
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !2974


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0f5a9f7934913935d632fc596ba1b585aa10fa29
commit 0f5a9f7934913935d632fc596ba1b585aa10fa29
Author:     Craig Scott <craig.sc...@crascit.com>
AuthorDate: Sat Feb 16 19:32:52 2019 +1100
Commit:     Craig Scott <craig.sc...@crascit.com>
CommitDate: Sat Feb 16 20:55:49 2019 +1100

    Help: Clarify and improve readability of link-related file subcommands

diff --git a/Help/command/file.rst b/Help/command/file.rst
index db4d6fc..465e567 100644
--- a/Help/command/file.rst
+++ b/Help/command/file.rst
@@ -26,8 +26,8 @@ Synopsis
     file(`MAKE_DIRECTORY`_ [<dir>...])
     file({`COPY`_ | `INSTALL`_} <file>... DESTINATION <dir> [...])
     file(`SIZE`_ <filename> <out-var>)
-    file(`READ_SYMLINK`_ <filename> <out-var>)
-    file(`CREATE_LINK`_ <file> <new-file> [...])
+    file(`READ_SYMLINK`_ <linkname> <out-var>)
+    file(`CREATE_LINK`_ <original> <linkname> [...])
 
   `Path Conversion`_
     file(`RELATIVE_PATH`_ <out-var> <directory> <file>)
@@ -350,22 +350,22 @@ pointing to a file and is readable.
 
 .. code-block:: cmake
 
-  file(READ_SYMLINK <filename> <variable>)
+  file(READ_SYMLINK <linkname> <variable>)
 
-Read the symlink at ``<filename>`` and put the result in ``<variable>``.
-Requires that ``<filename>`` is a valid path pointing to a symlink. If
-``<filename>`` does not exist, or is not a symlink, an error is thrown.
+This subcommand queries the symlink ``<linkname>`` and stores the path it
+points to in the result ``<variable>``.  If ``<linkname>`` does not exist or
+is not a symlink, CMake issues a fatal error.
 
 Note that this command returns the raw symlink path and does not resolve
-relative symlinks. If you want to resolve the relative symlink yourself, you
-could do something like this:
+a relative path.  The following is an example of how to ensure that an
+absolute path is obtained:
 
 .. code-block:: cmake
 
-  set(filename "/path/to/foo.sym")
-  file(READ_SYMLINK "${filename}" result)
+  set(linkname "/path/to/foo.sym")
+  file(READ_SYMLINK "${linkname}" result)
   if(NOT IS_ABSOLUTE "${result}")
-    get_filename_component(dir "${filename}" DIRECTORY)
+    get_filename_component(dir "${linkname}" DIRECTORY)
     set(result "${dir}/${result}")
   endif()
 
@@ -373,23 +373,23 @@ could do something like this:
 
 .. code-block:: cmake
 
-  file(CREATE_LINK <file> <new-file>
+  file(CREATE_LINK <original> <linkname>
        [RESULT <result>] [COPY_ON_ERROR] [SYMBOLIC])
 
-Create a link to ``<file>`` at ``<new-file>``.
+Create a link ``<linkname>`` that points to ``<original>``.
+It will be a hard link by default, but providing the ``SYMBOLIC`` option
+results in a symbolic link instead.  Hard links require that ``original``
+exists and is a file, not a directory.  If ``<linkname>`` already exists,
+it will be overwritten.
 
-It is a hard link by default. This can be changed to symbolic links by
-using ``SYMBOLIC``.  The original file needs to exist for hard links.
-
-The ``<result>`` variable, if specified, gets the status of the operation.
-It is set to ``0`` in case of success. Otherwise, it contains the error
-generated. In case of failures, if ``RESULT`` is not specified, a fatal error
-is emitted.
+The ``<result>`` variable, if specified, receives the status of the operation.
+It is set to ``0`` upon success or an error message otherwise.  If ``RESULT``
+is not specified and the operation fails, a fatal error is emitted.
 
 Specifying ``COPY_ON_ERROR`` enables copying the file as a fallback if
-creating the link fails.
-
-Overwrites the ``<new-file>`` if it exists.
+creating the link fails.  It can be useful for handling situations such as
+``<original>`` and ``<linkname>`` being on different drives or mount points,
+which would make them unable to support a hard link.
 
 Path Conversion
 ^^^^^^^^^^^^^^^

-----------------------------------------------------------------------

Summary of changes:
 Help/command/file.rst | 46 +++++++++++++++++++++++-----------------------
 1 file changed, 23 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to