summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cmCPackArchiveGenerator.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2010-11-13 16:56:36 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2010-11-13 16:56:36 (GMT)
commit2c84d169b36b1b8713517a8d8799b82dbf59725a (patch)
tree13cef3ebb30eda89fd3907c7b098cb4c8f2b8de9 /Source/CPack/cmCPackArchiveGenerator.cxx
parentd95017deec954ad81253c9d545eaeb323c52ac0e (diff)
downloadCMake-2c84d169b36b1b8713517a8d8799b82dbf59725a.zip
CMake-2c84d169b36b1b8713517a8d8799b82dbf59725a.tar.gz
CMake-2c84d169b36b1b8713517a8d8799b82dbf59725a.tar.bz2
CPackRPM add basic component support to CPackRPM
basic means 1 RPM per component and no dependency handling this implies some CPackGenerator refactoring
Diffstat (limited to 'Source/CPack/cmCPackArchiveGenerator.cxx')
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx65
1 files changed, 5 insertions, 60 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index c86434e..424c1a0 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -105,12 +105,12 @@ if (!archive) \
}
//----------------------------------------------------------------------
-int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
+int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
{
packageFileNames.clear();
// The default behavior is to have one package by component group
// unless CPACK_COMPONENTS_IGNORE_GROUP is specified.
- if (!ignoreComponentGroup)
+ if (!ignoreGroup)
{
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt=this->ComponentGroups.begin();
@@ -170,7 +170,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
}
//----------------------------------------------------------------------
-int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
+int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponent)
{
// reset the package file names
packageFileNames.clear();
@@ -185,7 +185,7 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
// The ALL GROUP in ONE package case
- if (! allComponentInOne) {
+ if (! allComponent) {
// iterate over the component groups
std::map<std::string, cmCPackComponentGroup>::iterator compGIt;
for (compGIt=this->ComponentGroups.begin();
@@ -226,63 +226,8 @@ int cmCPackArchiveGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Toplevel: "
<< toplevel << std::endl);
- // The default behavior is to create 1 package by component group
- // unless the user asked to put all COMPONENTS in a single package
- bool allGroupInOne = (NULL !=
- (this->GetOption(
- "CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE")));
- bool allComponentInOne = (NULL !=
- (this->GetOption(
- "CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
- bool ignoreComponentGroup = ( NULL !=
- (this->GetOption(
- "CPACK_COMPONENTS_IGNORE_GROUPS")));
+ PrepareGroupingKind();
- std::string groupingType;
-
- // Second way to specify grouping
- if (NULL != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
- groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
- }
-
- if (groupingType.length()>0)
- {
- cmCPackLogger(cmCPackLog::LOG_VERBOSE, "["
- << this->Name << "]"
- << " requested component grouping = "<< groupingType <<std::endl);
- if (groupingType == "ALL_GROUP_IN_ONE")
- {
- allGroupInOne = true;
- }
- else if (groupingType == "ALL_COMPONENT_IN_ONE")
- {
- allComponentInOne = true;
- }
- else if (groupingType == "IGNORE")
- {
- ignoreComponentGroup = true;
- }
- else
- {
- cmCPackLogger(cmCPackLog::LOG_WARNING, "["
- << this->Name << "]"
- << " requested component grouping type <"<< groupingType
- << "> UNKNOWN not in (ALL_GROUP_IN_ONE,"
- "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl);
- }
- }
-
- // Some components were defined but NO group
- // force ignoreGroups
- if (this->ComponentGroups.empty() && (!this->Components.empty())
- && (!ignoreComponentGroup)) {
- cmCPackLogger(cmCPackLog::LOG_WARNING, "["
- << this->Name << "]"
- << " Some Components defined but NO component group:"
- << " Ignoring component group."
- << std::endl);
- ignoreComponentGroup = true;
- }
// 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.