From 390117435ad0595d9fcc9cf4c93f70f7939b8cf6 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Wed, 15 Sep 2010 16:41:41 -0400 Subject: [PATCH] Fix KWStyle line length issues. --- Source/CPack/cmCPackArchiveGenerator.cxx | 52 +++++++++++++++++------- Source/CPack/cmCPackArchiveGenerator.h | 3 +- Source/CPack/cmCPackGenerator.cxx | 24 +++++++---- Source/CPack/cmCPackNSISGenerator.cxx | 3 +- Source/cmLocalVisualStudio6Generator.cxx | 3 +- 5 files changed, 59 insertions(+), 26 deletions(-) diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx index 79ccdd9e9..c86434e46 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::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::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::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)" < UNKNOWN not in (ALL_GROUP_IN_ONE," + "ALL_COMPONENT_IN_ONE,IGNORE)" <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 ae545c888..6e173bd9c 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 7c3ff1d7c..c39aea4f2 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 <" < to component <"<"< to component <" + <"<c_str()); + std::string fileN = cmSystemTools::RelativePath(toplevel.c_str(), + sit->c_str()); if ( fileN.empty() ) { continue; diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 01fcafdb0..eb4e4a4f2 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -1187,7 +1187,8 @@ void cmLocalVisualStudio6Generator extraLinkOptionsMinSizeRel += targetLinkFlags; } - if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO")) + if(const char* targetLinkFlags = + target.GetProperty("LINK_FLAGS_RELWITHDEBINFO")) { extraLinkOptionsRelWithDebInfo += " "; extraLinkOptionsRelWithDebInfo += targetLinkFlags;