summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-01-06 16:43:12 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-01-06 16:43:12 (GMT)
commitdc08199848c20c7f76a68dbf54a85c736809ac57 (patch)
tree0d0d5b59269c8edc078450b8aeecc519affa6a2f /Help
parentb225dbbd0235b545383105e0571f84a1bf6b1be0 (diff)
parent84fac67f90b275116efa9ec25f5fcb2c2bf7f6b4 (diff)
downloadCMake-dc08199848c20c7f76a68dbf54a85c736809ac57.zip
CMake-dc08199848c20c7f76a68dbf54a85c736809ac57.tar.gz
CMake-dc08199848c20c7f76a68dbf54a85c736809ac57.tar.bz2
Merge topic 'minor-cleanups'
84fac67 Don't allow include() of export(EXPORT) file at configure time. faedd2b cmTarget: Fix system include annotation propagation. 9eb06d0 add_library: Disallow invalid signatures for INTERFACE_LIBRARY. 10d65d5 cmTarget: Move a variable initialization closer to where it is used. 0f3e8e9 Undefine local preprocessor loop variables. 9ba47ee Genex: Reform error-checking for nullary/unary expressions. fa651c7 cmTarget: Remove some of the INTERFACE_LIBRARY whitelisted properties. 61d138a cmTarget: INTERFACE_LIBRARY is always EXCLUDE_FROM_ALL. 3429541 export: Rename some variables to reflect content type. 7461d67 cmTarget: Enable convenient include dir handling for INTERFACE_LIBRARY. 7fc6e3d cmTarget: Remove dead code. 2af966d Genex: Add EQUAL expression. 2d66380 cmTarget: Use strtol for numeric parsing.
Diffstat (limited to 'Help')
-rw-r--r--Help/command/add_library.rst17
-rw-r--r--Help/manual/cmake-generator-expressions.7.rst2
2 files changed, 15 insertions, 4 deletions
diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst
index 45f1102..2d69c89 100644
--- a/Help/command/add_library.rst
+++ b/Help/command/add_library.rst
@@ -109,12 +109,21 @@ The signature
::
- add_library(<name> INTERFACE)
+ add_library(<name> INTERFACE [IMPORTED [GLOBAL]])
creates an interface target. An interface target does not directly
create build output, though it may have properties set on it and it
may be installed, exported and imported. Typically the INTERFACE_*
properties are populated on the interface target using the
-set_property(), target_link_libraries(), target_include_directories()
-and target_compile_defintions() commands, and then it is used as an
-argument to target_link_libraries() like any other target.
+:command:`set_property`, :command:`target_link_libraries`,
+:command:`target_include_directories`
+and :command:`target_compile_defintions` commands, and then it is used as an
+argument to :command:`target_link_libraries` like any other target.
+
+An ``INTERFACE`` :prop_tgt:`IMPORTED` target may also be created with this
+signature. An :prop_tgt:`IMPORTED` library target references a library defined
+outside the project. The target name has scope in the directory in which it is
+created and below, but the ``GLOBAL`` option extends visibility. It may be
+referenced like any target built within the project. :prop_tgt:`IMPORTED`
+libraries are useful for convenient reference from commands like
+:command:`target_link_libraries`.
diff --git a/Help/manual/cmake-generator-expressions.7.rst b/Help/manual/cmake-generator-expressions.7.rst
index ed28abd..12cfaf8 100644
--- a/Help/manual/cmake-generator-expressions.7.rst
+++ b/Help/manual/cmake-generator-expressions.7.rst
@@ -55,6 +55,8 @@ otherwise expands to nothing.
``0`` if ``?`` is ``1``, else ``1``
``$<STREQUAL:a,b>``
``1`` if ``a`` is STREQUAL ``b``, else ``0``
+``$<EQUAL:a,b>``
+ ``1`` if ``a`` is EQUAL ``b`` in a numeric comparison, else ``0``
``$<CONFIG:cfg>``
``1`` if config is ``cfg``, else ``0``. This is a case-insensitive comparison.
The mapping in :prop_tgt:`MAP_IMPORTED_CONFIG_<CONFIG>` is also considered by