diff options
author | Brad King <brad.king@kitware.com> | 2015-04-06 13:11:34 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-04-06 13:11:34 (GMT) |
commit | 0e6b00ee494f341be104fa2a00543fc4acd43c6f (patch) | |
tree | 62675e8f29e160f3799b03078529be1fc81b4bea | |
parent | 156d3f8903057ba92195f442cc1d0dd817731bc8 (diff) | |
parent | 0ffd35340e5458882b4b9596a84dd7cdfeaecfbd (diff) | |
download | CMake-0e6b00ee494f341be104fa2a00543fc4acd43c6f.zip CMake-0e6b00ee494f341be104fa2a00543fc4acd43c6f.tar.gz CMake-0e6b00ee494f341be104fa2a00543fc4acd43c6f.tar.bz2 |
Merge topic 'cpack-one-component-only'
0ffd3534 CPack single component packaging
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 67005ef..995eb0d 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1499,7 +1499,10 @@ bool cmCPackGenerator::SupportsComponentInstallation() const //---------------------------------------------------------------------- bool cmCPackGenerator::WantsComponentInstallation() const { - return (!IsOn("CPACK_MONOLITHIC_INSTALL") & SupportsComponentInstallation()); + return (!IsOn("CPACK_MONOLITHIC_INSTALL") + && SupportsComponentInstallation() + // check that package at least has components + && !(this->ComponentGroups.empty() || this->Components.empty())); } //---------------------------------------------------------------------- diff --git a/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake b/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake index 3ace6a8..31e729b 100644 --- a/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake +++ b/Tests/RunCMake/CPackRPM/CPackRPM_PARTIALLY_RELOCATABLE_WARNING.cmake @@ -1,5 +1,4 @@ install(FILES CMakeLists.txt DESTINATION /not_relocatable COMPONENT static) -install(FILES CMakeLists.txt DESTINATION relocatable COMPONENT relocatable) set(CPACK_PACKAGE_RELOCATABLE TRUE) set(CPACK_PACKAGING_INSTALL_PREFIX "/opt") |