diff options
author | Brad King <brad.king@kitware.com> | 2018-02-28 15:58:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-02-28 15:58:10 (GMT) |
commit | ea0ce73a195e1cc0f672f1e7519c42a240592f15 (patch) | |
tree | 568319f21bf3e9ed2583832c0b2e69eb2d29d5b3 /Help/command | |
parent | d870148537319da2e86237cbd8baf6815975e594 (diff) | |
download | CMake-ea0ce73a195e1cc0f672f1e7519c42a240592f15.zip CMake-ea0ce73a195e1cc0f672f1e7519c42a240592f15.tar.gz CMake-ea0ce73a195e1cc0f672f1e7519c42a240592f15.tar.bz2 |
install,export: Maybe transform OBJECT libraries to INTERFACE libraries
Teach the `install` and `export` commands to support installing and
exporting `OBJECT` libraries without their object files. Transform
them to `INTERFACE` libraries in such cases.
For `install(TARGETS)`, activate this when no destination for the object
files is specified. For `export`, activate this only under Xcode with
multiple architectures when we have no well-defined object file
locations to give to clients.
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/export.rst | 7 | ||||
-rw-r--r-- | Help/command/install.rst | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Help/command/export.rst b/Help/command/export.rst index 53675a7..17fcecb 100644 --- a/Help/command/export.rst +++ b/Help/command/export.rst @@ -40,6 +40,13 @@ policy CMP0022 is NEW. If a library target is included in the export but a target to which it links is not included the behavior is unspecified. +.. note:: + + :ref:`Object Libraries` under :generator:`Xcode` have special handling if + multiple architectures are listed in :variable:`CMAKE_OSX_ARCHITECTURES`. + In this case they will be exported as :ref:`Interface Libraries` with + no object files available to clients. + :: export(PACKAGE <name>) diff --git a/Help/command/install.rst b/Help/command/install.rst index 2506f98..1cedc35 100644 --- a/Help/command/install.rst +++ b/Help/command/install.rst @@ -183,6 +183,11 @@ export called ``<export-name>``. It must appear before any ``RUNTIME``, ``LIBRARY``, ``ARCHIVE``, or ``OBJECTS`` options. To actually install the export file itself, call ``install(EXPORT)``, documented below. +:ref:`Interface Libraries` may be listed among the targets to install. +They install no artifacts but will be included in an associated ``EXPORT``. +If :ref:`Object Libraries` are listed but given no destination for their +object files, they will be exported as :ref:`Interface Libraries`. + Installing a target with the :prop_tgt:`EXCLUDE_FROM_ALL` target property set to ``TRUE`` has undefined behavior. |