summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-02 19:24:51 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2010-12-02 19:24:51 (GMT)
commit42fac2580851e3297b774dc21c0b4752e8f84407 (patch)
treee2360d983f5786b89a8588d66c8a01b4c572bd21 /Source
parentb4bd2d3bafb11f438eb655466856c75fd1b24b05 (diff)
parent12a7125b323fe2d996fd536f2808a94f6e02e438 (diff)
downloadCMake-42fac2580851e3297b774dc21c0b4752e8f84407.zip
CMake-42fac2580851e3297b774dc21c0b4752e8f84407.tar.gz
CMake-42fac2580851e3297b774dc21c0b4752e8f84407.tar.bz2
Merge topic 'CPack-Bug11452-ComponentBreakage-v2'
12a7125 CPack Fix KWStyle error d0eb89c CPack backward compatibility fix 2.8.3-2.8.2 (bug 11452)
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx46
1 files changed, 30 insertions, 16 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index 424c1a0..ded329d 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -228,21 +228,25 @@ int cmCPackArchiveGenerator::PackageFiles()
PrepareGroupingKind();
- // CASE 1 : COMPONENT ALL-IN-ONE package
- // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
- // then the package file is unique and should be open here.
- if (allComponentInOne || (allGroupInOne && (!this->ComponentGroups.empty())))
- {
- return PackageComponentsAllInOne(allComponentInOne);
- }
- // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
- // There will be 1 package for each component group
- // however one may require to ignore component group and
- // in this case you'll get 1 package for each component.
- else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
- {
- return PackageComponents(ignoreComponentGroup);
- }
+ if (SupportsComponentInstallation()) {
+ // CASE 1 : COMPONENT ALL-IN-ONE package
+ // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
+ // then the package file is unique and should be open here.
+ if (allComponentInOne ||
+ (allGroupInOne && (!this->ComponentGroups.empty()))
+ )
+ {
+ return PackageComponentsAllInOne(allComponentInOne);
+ }
+ // CASE 2 : COMPONENT CLASSICAL package(s) (i.e. not all-in-one)
+ // There will be 1 package for each component group
+ // however one may require to ignore component group and
+ // in this case you'll get 1 package for each component.
+ else if ((!this->ComponentGroups.empty()) || (ignoreComponentGroup))
+ {
+ return PackageComponents(ignoreComponentGroup);
+ }
+ }
// CASE 3 : NON COMPONENT package.
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
@@ -278,5 +282,15 @@ int cmCPackArchiveGenerator::GenerateHeader(std::ostream*)
}
bool cmCPackArchiveGenerator::SupportsComponentInstallation() const {
- return true;
+ // The Component installation support should only
+ // be activated if explicitly requested by the user
+ // (for backward compatibility reason)
+ if (IsSet("CPACK_ARCHIVE_COMPONENT_INSTALL"))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}