diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2010-09-15 20:41:41 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2010-09-15 20:41:41 (GMT) |
commit | 390117435ad0595d9fcc9cf4c93f70f7939b8cf6 (patch) | |
tree | 164190a7138e342926219c4f2b7ada65bed4309b /Source/CPack | |
parent | de7a090847b4e3113209cf518742cbc1988b3fd8 (diff) | |
download | CMake-390117435ad0595d9fcc9cf4c93f70f7939b8cf6.zip CMake-390117435ad0595d9fcc9cf4c93f70f7939b8cf6.tar.gz CMake-390117435ad0595d9fcc9cf4c93f70f7939b8cf6.tar.bz2 |
Fix KWStyle line length issues.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.cxx | 52 | ||||
-rw-r--r-- | Source/CPack/cmCPackArchiveGenerator.h | 3 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 24 | ||||
-rw-r--r-- | Source/CPack/cmCPackNSISGenerator.cxx | 3 |
4 files changed, 57 insertions, 25 deletions
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 79ccdd9..c86434e 100644 --- a/Source/CPack/cmCPackArchiveGenerator.cxx +++ b/Source/CPack/cmCPackArchiveGenerator.cxx @@ -58,9 +58,11 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive, // Change to local toplevel cmSystemTools::ChangeDirectory(localToplevel.c_str()); std::vector<std::string>::const_iterator fileIt; - for (fileIt = component->Files.begin(); fileIt != component->Files.end(); ++fileIt ) + for (fileIt = component->Files.begin(); fileIt != component->Files.end(); + ++fileIt ) { - cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " << (*fileIt) << std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG,"Adding file: " + << (*fileIt) << std::endl); archive.Add(*fileIt); if (!archive) { @@ -85,7 +87,8 @@ cmGeneratedFileStream gf; \ gf.Open(filename.c_str(), false, true); \ if (!GenerateHeader(&gf)) \ { \ - cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to generate Header for archive < " \ + cmCPackLogger(cmCPackLog::LOG_ERROR, \ + "Problem to generate Header for archive < " \ << filename \ << ">." << std::endl); \ return 0; \ @@ -118,7 +121,9 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup) << std::endl); // Begin the archive for this group std::string packageFileName= std::string(toplevel); - packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compGIt->first + this->GetOutputExtension(); + packageFileName += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-"+compGIt->first + this->GetOutputExtension(); // open a block in order to automatically close archive // at the end of the block { @@ -142,13 +147,16 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup) else { std::map<std::string, cmCPackComponent>::iterator compIt; - for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt ) + for (compIt=this->Components.begin(); + compIt!=this->Components.end(); ++compIt ) { std::string localToplevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY")); std::string packageFileName = std::string(toplevel); localToplevel += "/"+ compIt->first; - packageFileName += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-"+compIt->first + this->GetOutputExtension(); + packageFileName += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-"+compIt->first + this->GetOutputExtension(); { DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive); // Add the files of this component to the archive @@ -167,8 +175,12 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne) // reset the package file names packageFileNames.clear(); packageFileNames.push_back(std::string(toplevel)); - packageFileNames[0] += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-ALL" + this->GetOutputExtension(); - cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package...(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)" + packageFileNames[0] += "/" + +std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME")) + +"-ALL" + this->GetOutputExtension(); + cmCPackLogger(cmCPackLog::LOG_VERBOSE, + "Packaging all groups in one package..." + "(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)" << std::endl); DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive); @@ -197,7 +209,8 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne) else { std::map<std::string, cmCPackComponent>::iterator compIt; - for (compIt=this->Components.begin();compIt!=this->Components.end(); ++compIt ) + for (compIt=this->Components.begin();compIt!=this->Components.end(); + ++compIt ) { // Add the files of this component to the archive addOneComponentToArchive(archive,&(compIt->second)); @@ -215,9 +228,15 @@ int cmCPackArchiveGenerator::PackageFiles() // 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"))); + 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"))); std::string groupingType; @@ -248,13 +267,15 @@ int cmCPackArchiveGenerator::PackageFiles() 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); + << "> 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)) { + if (this->ComponentGroups.empty() && (!this->Components.empty()) + && (!ignoreComponentGroup)) { cmCPackLogger(cmCPackLog::LOG_WARNING, "[" << this->Name << "]" << " Some Components defined but NO component group:" @@ -286,7 +307,8 @@ int cmCPackArchiveGenerator::PackageFiles() for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt ) { // Get the relative path to the file - std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str()); + std::string rp = cmSystemTools::RelativePath(toplevel.c_str(), + fileIt->c_str()); archive.Add(rp); if(!archive) { diff --git a/Source/CPack/cmCPackArchiveGenerator.h b/Source/CPack/cmCPackArchiveGenerator.h index ae545c8..6e173bd 100644 --- a/Source/CPack/cmCPackArchiveGenerator.h +++ b/Source/CPack/cmCPackArchiveGenerator.h @@ -45,7 +45,8 @@ protected: * @param[in,out] archive the archive object * @param[in] component the component whose file will be added to archive */ - int addOneComponentToArchive(cmArchiveWrite& archive, cmCPackComponent* component); + int addOneComponentToArchive(cmArchiveWrite& archive, + cmCPackComponent* component); /** * The main package file method. diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 7c3ff1d..c39aea4 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -172,7 +172,8 @@ int cmCPackGenerator::InstallProject() = this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY"); std::string tempInstallDirectoryStr = bareTempInstallDirectory; bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR")) - | cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR")); + | cmSystemTools::IsInternallyOn( + this->GetOption("CPACK_SET_DESTDIR")); if (!setDestDir) { tempInstallDirectoryStr += this->GetPackagingInstallPrefix(); @@ -694,9 +695,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( // CPACK_PACKAGING_INSTALL_PREFIX // I know this is tricky and awkward but it's the price for // CPACK_SET_DESTDIR backward compatibility. - if (cmSystemTools::IsInternallyOn(this->GetOption("CPACK_SET_DESTDIR"))) + if (cmSystemTools::IsInternallyOn( + this->GetOption("CPACK_SET_DESTDIR"))) { - this->SetOption("CPACK_INSTALL_PREFIX",this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")); + this->SetOption("CPACK_INSTALL_PREFIX", + this->GetOption("CPACK_PACKAGING_INSTALL_PREFIX")); } std::string dir; if (this->GetOption("CPACK_INSTALL_PREFIX")) @@ -782,7 +785,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( if (absoluteDestFiles.length()>0) { absoluteDestFiles +=";"; } - absoluteDestFiles += mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"); + absoluteDestFiles += + mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES"); cmCPackLogger(cmCPackLog::LOG_DEBUG, "Got some ABSOLUTE DESTINATION FILES: " << absoluteDestFiles << std::endl); @@ -794,7 +798,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( } } } - this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES",absoluteDestFiles.c_str()); + this->SetOption("CPACK_ABSOLUTE_DESTINATION_FILES", + absoluteDestFiles.c_str()); return 1; } @@ -921,8 +926,9 @@ int cmCPackGenerator::DoPackage() // beware we cannot just use tempDirectory as before // because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY" // we really want "CPACK_TEMPORARY_DIRECTORY" - std::string fileN = cmSystemTools::RelativePath(this->GetOption("CPACK_TEMPORARY_DIRECTORY"), - it->c_str()); + std::string fileN = + cmSystemTools::RelativePath( + this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str()); // Determine which component we are in. std::string componentName = fileN.substr(0, fileN.find('/')); @@ -932,7 +938,9 @@ int cmCPackGenerator::DoPackage() // Add this file to the list of files for the component. this->Components[componentName].Files.push_back(fileN); - cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" <<fileN<<"> to component <"<<componentName<<">"<<std::endl); + cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file <" + <<fileN<<"> to component <" + <<componentName<<">"<<std::endl); } } diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx index f6f9fbc..d0eda81 100644 --- a/Source/CPack/cmCPackNSISGenerator.cxx +++ b/Source/CPack/cmCPackNSISGenerator.cxx @@ -93,7 +93,8 @@ int cmCPackNSISGenerator::PackageFiles() for ( sit = dirs.begin(); sit != dirs.end(); ++ sit ) { std::string componentName; - std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), sit->c_str()); + std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), + sit->c_str()); if ( fileN.empty() ) { continue; |