Browse Source

Merge branch 'doc-target_link_libraries-item-quoting' into release-3.13

Merge-request: !2503
Brad King 7 years ago
parent
commit
f3719a790c
1 changed files with 12 additions and 0 deletions
  1. 12 0
      Help/command/target_link_libraries.rst

+ 12 - 0
Help/command/target_link_libraries.rst

@@ -43,6 +43,9 @@ Each ``<item>`` may be:
   the library instead of using the full path
   the library instead of using the full path
   (e.g. ``/usr/lib/libfoo.so`` becomes ``-lfoo``).
   (e.g. ``/usr/lib/libfoo.so`` becomes ``-lfoo``).
 
 
+  The full path to the target's artifact will be quoted/escaped for
+  the shell automatically.
+
 * **A full path to a library file**: The generated link line will
 * **A full path to a library file**: The generated link line will
   normally preserve the full path to the file. The buildsystem will
   normally preserve the full path to the file. The buildsystem will
   have a dependency to re-link ``<target>`` if the library file changes.
   have a dependency to re-link ``<target>`` if the library file changes.
@@ -62,9 +65,15 @@ Each ``<item>`` may be:
   imported into generated project files.  This is not supported by other
   imported into generated project files.  This is not supported by other
   generators.
   generators.
 
 
+  The full path to the library file will be quoted/escaped for
+  the shell automatically.
+
 * **A plain library name**: The generated link line will ask the linker
 * **A plain library name**: The generated link line will ask the linker
   to search for the library (e.g. ``foo`` becomes ``-lfoo`` or ``foo.lib``).
   to search for the library (e.g. ``foo`` becomes ``-lfoo`` or ``foo.lib``).
 
 
+  The library name/flag is treated as a command-line string fragment and
+  will be used with no extra quoting or escaping.
+
 * **A link flag**: Item names starting with ``-``, but not ``-l`` or
 * **A link flag**: Item names starting with ``-``, but not ``-l`` or
   ``-framework``, are treated as linker flags.  Note that such flags will
   ``-framework``, are treated as linker flags.  Note that such flags will
   be treated like any other library link item for purposes of transitive
   be treated like any other library link item for purposes of transitive
@@ -78,6 +87,9 @@ Each ``<item>`` may be:
   flags explicitly. The flags will then be placed at the toolchain-defined
   flags explicitly. The flags will then be placed at the toolchain-defined
   flag position in the link command.
   flag position in the link command.
 
 
+  The link flag is treated as a command-line string fragment and
+  will be used with no extra quoting or escaping.
+
 * **A generator expression**: A ``$<...>`` :manual:`generator expression
 * **A generator expression**: A ``$<...>`` :manual:`generator expression
   <cmake-generator-expressions(7)>` may evaluate to any of the above
   <cmake-generator-expressions(7)>` may evaluate to any of the above
   items or to a :ref:`;-list <CMake Language Lists>` of them.
   items or to a :ref:`;-list <CMake Language Lists>` of them.