diff options
author | Nick Lewis <nick.lewis@amag.com> | 2016-02-01 10:01:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-02-04 14:16:56 (GMT) |
commit | 18ce97c4a20b7da4e11006ad80f17cb55e128db1 (patch) | |
tree | 411ffa3d6c2fa573a2b69be606810859b72d729f /Source/cmInstallProgramsCommand.cxx | |
parent | bfd1b3aabaa9a2ec46ca6ebfa50d56dfa8846fb3 (diff) | |
download | CMake-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 'Source/cmInstallProgramsCommand.cxx')
-rw-r--r-- | Source/cmInstallProgramsCommand.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx index e6fbe88..b6d0c45 100644 --- a/Source/cmInstallProgramsCommand.cxx +++ b/Source/cmInstallProgramsCommand.cxx @@ -85,6 +85,7 @@ void cmInstallProgramsCommand::FinalPass() // Use a file install generator. const char* no_permissions = ""; const char* no_rename = ""; + bool no_exclude_from_all = false; std::string no_component = this->Makefile->GetSafeDefinition( "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"); std::vector<std::string> no_configurations; @@ -94,7 +95,8 @@ void cmInstallProgramsCommand::FinalPass() new cmInstallFilesGenerator(this->Files, destination.c_str(), true, no_permissions, no_configurations, - no_component.c_str(), message, no_rename)); + no_component.c_str(), message, + no_exclude_from_all, no_rename)); } /** |