summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackArchiveGenerator.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2011-03-23 17:28:05 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2011-03-23 17:28:05 (GMT)
commit6dfc818394d302d5966431fc72b4150777780b79 (patch)
treec4837ae3a47a244be37e835760feac8d86bd86cf /Source/CPack/cmCPackArchiveGenerator.cxx
parent4344e83fcf521072b0101b67a50e31e7f4032abb (diff)
downloadCMake-6dfc818394d302d5966431fc72b4150777780b79.zip
CMake-6dfc818394d302d5966431fc72b4150777780b79.tar.gz
CMake-6dfc818394d302d5966431fc72b4150777780b79.tar.bz2
CPack fix #11930 and simplifies component packaging options
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx49
1 files changed, 12 insertions, 37 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index b629c63..55d9890 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -207,7 +207,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
}
//----------------------------------------------------------------------
-int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponent)
+int cmCPackArchiveGenerator::PackageComponentsAllInOne()
{
// reset the package file names
packageFileNames.clear();
@@ -221,38 +221,15 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponent)
<< std::endl);
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
- // The ALL GROUP in ONE package case
- if (! allComponent) {
- // iterate over the component groups
- std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
- for (compGIt=this->ComponentGroups.begin();
- compGIt!=this->ComponentGroups.end(); ++compGIt)
- {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging component group: "
- << compGIt->first
- << std::endl);
- // now iterate over the component of this group
- std::vector<cmCPackComponent*>::iterator compIt;
- for (compIt=(compGIt->second).Components.begin();
- compIt!=(compGIt->second).Components.end();
- ++compIt)
- {
- // Add the files of this component to the archive
- addOneComponentToArchive(archive,*compIt);
- }
- }
- }
- // The ALL COMPONENT in ONE package case
- else
+ // The ALL COMPONENTS in ONE package case
+ std::map<std::string, cmCPackComponent>::iterator compIt;
+ for (compIt=this->Components.begin();compIt!=this->Components.end();
+ ++compIt )
{
- std::map<std::string, cmCPackComponent>::iterator compIt;
- for (compIt=this->Components.begin();compIt!=this->Components.end();
- ++compIt )
- {
- // Add the files of this component to the archive
- addOneComponentToArchive(archive,&(compIt->second));
- }
+ // Add the files of this component to the archive
+ addOneComponentToArchive(archive,&(compIt->second));
}
+
// archive goes out of scope so it will finalized and closed.
return 1;
}
@@ -265,19 +242,17 @@ int cmCPackArchiveGenerator::PackageFiles()
if (SupportsComponentInstallation()) {
// CASE 1 : COMPONENT ALL-IN-ONE package
- // If ALL GROUPS or ALL COMPONENTS in ONE package has been requested
+ // If 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()))
- )
+ if (allComponentInOne)
{
- return PackageComponentsAllInOne(allComponentInOne);
+ return PackageComponentsAllInOne();
}
// 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))
+ else
{
return PackageComponents(ignoreComponentGroup);
}