Fix KWStyle line length issues.
This commit is contained in:
parent
de7a090847
commit
390117435a
|
@ -58,9 +58,11 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(cmArchiveWrite& archive,
|
||||||
// Change to local toplevel
|
// Change to local toplevel
|
||||||
cmSystemTools::ChangeDirectory(localToplevel.c_str());
|
cmSystemTools::ChangeDirectory(localToplevel.c_str());
|
||||||
std::vector<std::string>::const_iterator fileIt;
|
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);
|
archive.Add(*fileIt);
|
||||||
if (!archive)
|
if (!archive)
|
||||||
{
|
{
|
||||||
|
@ -85,7 +87,8 @@ cmGeneratedFileStream gf; \
|
||||||
gf.Open(filename.c_str(), false, true); \
|
gf.Open(filename.c_str(), false, true); \
|
||||||
if (!GenerateHeader(&gf)) \
|
if (!GenerateHeader(&gf)) \
|
||||||
{ \
|
{ \
|
||||||
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem to generate Header for archive < " \
|
cmCPackLogger(cmCPackLog::LOG_ERROR, \
|
||||||
|
"Problem to generate Header for archive < " \
|
||||||
<< filename \
|
<< filename \
|
||||||
<< ">." << std::endl); \
|
<< ">." << std::endl); \
|
||||||
return 0; \
|
return 0; \
|
||||||
|
@ -118,7 +121,9 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
|
||||||
<< std::endl);
|
<< std::endl);
|
||||||
// Begin the archive for this group
|
// Begin the archive for this group
|
||||||
std::string packageFileName= std::string(toplevel);
|
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
|
// open a block in order to automatically close archive
|
||||||
// at the end of the block
|
// at the end of the block
|
||||||
{
|
{
|
||||||
|
@ -142,13 +147,16 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreComponentGroup)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::map<std::string, cmCPackComponent>::iterator compIt;
|
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 localToplevel(this->GetOption("CPACK_TEMPORARY_DIRECTORY"));
|
||||||
std::string packageFileName = std::string(toplevel);
|
std::string packageFileName = std::string(toplevel);
|
||||||
|
|
||||||
localToplevel += "/"+ compIt->first;
|
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);
|
DECLARE_AND_OPEN_ARCHIVE(packageFileName,archive);
|
||||||
// Add the files of this component to the archive
|
// Add the files of this component to the archive
|
||||||
|
@ -167,8 +175,12 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
|
||||||
// reset the package file names
|
// reset the package file names
|
||||||
packageFileNames.clear();
|
packageFileNames.clear();
|
||||||
packageFileNames.push_back(std::string(toplevel));
|
packageFileNames.push_back(std::string(toplevel));
|
||||||
packageFileNames[0] += "/"+std::string(this->GetOption("CPACK_PACKAGE_FILE_NAME"))+"-ALL" + this->GetOutputExtension();
|
packageFileNames[0] += "/"
|
||||||
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Packaging all groups in one package...(CPACK_COMPONENTS_ALL_GROUPS_IN_ONE_PACKAGE is set)"
|
+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);
|
<< std::endl);
|
||||||
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
|
DECLARE_AND_OPEN_ARCHIVE(packageFileNames[0],archive);
|
||||||
|
|
||||||
|
@ -197,7 +209,8 @@ int cmCPackArchiveGenerator::PackageComponentsAllInOne(bool allComponentInOne)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::map<std::string, cmCPackComponent>::iterator compIt;
|
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
|
// Add the files of this component to the archive
|
||||||
addOneComponentToArchive(archive,&(compIt->second));
|
addOneComponentToArchive(archive,&(compIt->second));
|
||||||
|
@ -215,9 +228,15 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||||
|
|
||||||
// The default behavior is to create 1 package by component group
|
// The default behavior is to create 1 package by component group
|
||||||
// unless the user asked to put all COMPONENTS in a single package
|
// 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 allGroupInOne = (NULL !=
|
||||||
bool allComponentInOne = (NULL != (this->GetOption("CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE")));
|
(this->GetOption(
|
||||||
bool ignoreComponentGroup = ( NULL != (this->GetOption("CPACK_COMPONENTS_IGNORE_GROUPS")));
|
"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;
|
std::string groupingType;
|
||||||
|
|
||||||
|
@ -248,13 +267,15 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
|
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
|
||||||
<< this->Name << "]"
|
<< this->Name << "]"
|
||||||
<< " requested component grouping type <"<< groupingType
|
<< " 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
|
// Some components were defined but NO group
|
||||||
// force ignoreGroups
|
// force ignoreGroups
|
||||||
if (this->ComponentGroups.empty() && (!this->Components.empty()) && (!ignoreComponentGroup)) {
|
if (this->ComponentGroups.empty() && (!this->Components.empty())
|
||||||
|
&& (!ignoreComponentGroup)) {
|
||||||
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
|
cmCPackLogger(cmCPackLog::LOG_WARNING, "["
|
||||||
<< this->Name << "]"
|
<< this->Name << "]"
|
||||||
<< " Some Components defined but NO component group:"
|
<< " Some Components defined but NO component group:"
|
||||||
|
@ -286,7 +307,8 @@ int cmCPackArchiveGenerator::PackageFiles()
|
||||||
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
|
for ( fileIt = files.begin(); fileIt != files.end(); ++ fileIt )
|
||||||
{
|
{
|
||||||
// Get the relative path to the file
|
// 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);
|
archive.Add(rp);
|
||||||
if(!archive)
|
if(!archive)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,8 @@ protected:
|
||||||
* @param[in,out] archive the archive object
|
* @param[in,out] archive the archive object
|
||||||
* @param[in] component the component whose file will be added to archive
|
* @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.
|
* The main package file method.
|
||||||
|
|
|
@ -172,7 +172,8 @@ int cmCPackGenerator::InstallProject()
|
||||||
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
|
= this->GetOption("CPACK_TEMPORARY_INSTALL_DIRECTORY");
|
||||||
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
|
std::string tempInstallDirectoryStr = bareTempInstallDirectory;
|
||||||
bool setDestDir = cmSystemTools::IsOn(this->GetOption("CPACK_SET_DESTDIR"))
|
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)
|
if (!setDestDir)
|
||||||
{
|
{
|
||||||
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
|
tempInstallDirectoryStr += this->GetPackagingInstallPrefix();
|
||||||
|
@ -694,9 +695,11 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
// CPACK_PACKAGING_INSTALL_PREFIX
|
// CPACK_PACKAGING_INSTALL_PREFIX
|
||||||
// I know this is tricky and awkward but it's the price for
|
// I know this is tricky and awkward but it's the price for
|
||||||
// CPACK_SET_DESTDIR backward compatibility.
|
// 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;
|
std::string dir;
|
||||||
if (this->GetOption("CPACK_INSTALL_PREFIX"))
|
if (this->GetOption("CPACK_INSTALL_PREFIX"))
|
||||||
|
@ -782,7 +785,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
|
||||||
if (absoluteDestFiles.length()>0) {
|
if (absoluteDestFiles.length()>0) {
|
||||||
absoluteDestFiles +=";";
|
absoluteDestFiles +=";";
|
||||||
}
|
}
|
||||||
absoluteDestFiles += mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
|
absoluteDestFiles +=
|
||||||
|
mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES");
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
cmCPackLogger(cmCPackLog::LOG_DEBUG,
|
||||||
"Got some ABSOLUTE DESTINATION FILES: "
|
"Got some ABSOLUTE DESTINATION FILES: "
|
||||||
<< absoluteDestFiles << std::endl);
|
<< 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;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -921,8 +926,9 @@ int cmCPackGenerator::DoPackage()
|
||||||
// beware we cannot just use tempDirectory as before
|
// beware we cannot just use tempDirectory as before
|
||||||
// because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
|
// because some generator will "CPACK_INCLUDE_TOPLEVEL_DIRECTORY"
|
||||||
// we really want "CPACK_TEMPORARY_DIRECTORY"
|
// we really want "CPACK_TEMPORARY_DIRECTORY"
|
||||||
std::string fileN = cmSystemTools::RelativePath(this->GetOption("CPACK_TEMPORARY_DIRECTORY"),
|
std::string fileN =
|
||||||
it->c_str());
|
cmSystemTools::RelativePath(
|
||||||
|
this->GetOption("CPACK_TEMPORARY_DIRECTORY"), it->c_str());
|
||||||
|
|
||||||
// Determine which component we are in.
|
// Determine which component we are in.
|
||||||
std::string componentName = fileN.substr(0, fileN.find('/'));
|
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.
|
// Add this file to the list of files for the component.
|
||||||
this->Components[componentName].Files.push_back(fileN);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,8 @@ int cmCPackNSISGenerator::PackageFiles()
|
||||||
for ( sit = dirs.begin(); sit != dirs.end(); ++ sit )
|
for ( sit = dirs.begin(); sit != dirs.end(); ++ sit )
|
||||||
{
|
{
|
||||||
std::string componentName;
|
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() )
|
if ( fileN.empty() )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -1187,7 +1187,8 @@ void cmLocalVisualStudio6Generator
|
||||||
extraLinkOptionsMinSizeRel += targetLinkFlags;
|
extraLinkOptionsMinSizeRel += targetLinkFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(const char* targetLinkFlags = target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
|
if(const char* targetLinkFlags =
|
||||||
|
target.GetProperty("LINK_FLAGS_RELWITHDEBINFO"))
|
||||||
{
|
{
|
||||||
extraLinkOptionsRelWithDebInfo += " ";
|
extraLinkOptionsRelWithDebInfo += " ";
|
||||||
extraLinkOptionsRelWithDebInfo += targetLinkFlags;
|
extraLinkOptionsRelWithDebInfo += targetLinkFlags;
|
||||||
|
|
Loading…
Reference in New Issue