summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorNick Lewis <nick.lewis@amag.com>2016-02-01 10:01:39 (GMT)
committerBrad King <brad.king@kitware.com>2016-02-04 14:16:56 (GMT)
commit18ce97c4a20b7da4e11006ad80f17cb55e128db1 (patch)
tree411ffa3d6c2fa573a2b69be606810859b72d729f /Help
parentbfd1b3aabaa9a2ec46ca6ebfa50d56dfa8846fb3 (diff)
downloadCMake-18ce97c4a20b7da4e11006ad80f17cb55e128db1.zip
CMake-18ce97c4a20b7da4e11006ad80f17cb55e128db1.tar.gz
CMake-18ce97c4a20b7da4e11006ad80f17cb55e128db1.tar.bz2
install: Add EXCLUDE_FROM_ALL option (#14921)
Let us take an example of a project that has some tests in a component that need to be installed into a dedicated test package. The user expectation is that the result could be achieved by typing the following: make make tests make install DESTDIR=/testpkgs make install-tests However this results in test components in the default installation as well as the testpkg. Add an EXCLUDE_FROM_ALL option to the install() command to tell it that the installation rule should not be included unless its component is explicitly specified for installation.
Diffstat (limited to 'Help')
-rw-r--r--Help/command/install.rst23
1 files changed, 15 insertions, 8 deletions
diff --git a/Help/command/install.rst b/Help/command/install.rst
index 5d2add7..189b51c 100644
--- a/Help/command/install.rst
+++ b/Help/command/install.rst
@@ -45,11 +45,15 @@ signatures that specify them. The common options are:
is associated, such as "runtime" or "development". During
component-specific installation only install rules associated with
the given component name will be executed. During a full installation
- all components are installed. If ``COMPONENT`` is not provided a
- default component "Unspecified" is created. The default component
- name may be controlled with the
+ all components are installed unless marked with ``EXCLUDE_FROM_ALL``.
+ If ``COMPONENT`` is not provided a default component "Unspecified" is
+ created. The default component name may be controlled with the
:variable:`CMAKE_INSTALL_DEFAULT_COMPONENT_NAME` variable.
+``EXCLUDE_FROM_ALL``
+ Specify that the file is excluded from a full installation and only
+ installed as part of a component-specific installation
+
``RENAME``
Specify a name for an installed file that may be different from the
original file. Renaming is allowed only when a single file is
@@ -76,7 +80,8 @@ Installing Targets
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT <component>]
- [OPTIONAL] [NAMELINK_ONLY|NAMELINK_SKIP]
+ [OPTIONAL] [EXCLUDE_FROM_ALL]
+ [NAMELINK_ONLY|NAMELINK_SKIP]
] [...])
The ``TARGETS`` form specifies rules for installing targets from a
@@ -172,7 +177,7 @@ Installing Files
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[COMPONENT <component>]
- [RENAME <name>] [OPTIONAL])
+ [RENAME <name>] [OPTIONAL] [EXCLUDE_FROM_ALL])
The ``FILES`` form specifies rules for installing files for a project.
File names given as relative paths are interpreted with respect to the
@@ -206,7 +211,8 @@ Installing Directories
[DIRECTORY_PERMISSIONS permissions...]
[USE_SOURCE_PERMISSIONS] [OPTIONAL] [MESSAGE_NEVER]
[CONFIGURATIONS [Debug|Release|...]]
- [COMPONENT <component>] [FILES_MATCHING]
+ [COMPONENT <component>] [EXCLUDE_FROM_ALL]
+ [FILES_MATCHING]
[[PATTERN <pattern> | REGEX <regex>]
[EXCLUDE] [PERMISSIONS permissions...]] [...])
@@ -282,7 +288,7 @@ Custom Installation Logic
::
install([[SCRIPT <file>] [CODE <code>]]
- [COMPONENT <component>] [...])
+ [COMPONENT <component>] [EXCLUDE_FROM_ALL] [...])
The ``SCRIPT`` form will invoke the given CMake script files during
installation. If the script file name is a relative path it will be
@@ -307,7 +313,8 @@ Installing Exports
[PERMISSIONS permissions...]
[CONFIGURATIONS [Debug|Release|...]]
[EXPORT_LINK_INTERFACE_LIBRARIES]
- [COMPONENT <component>])
+ [COMPONENT <component>]
+ [EXCLUDE_FROM_ALL])
The ``EXPORT`` form generates and installs a CMake file containing code to
import targets from the installation tree into another project.