CPack: Avoid member shadowing after API refactor
After converting method arguments to members we need to avoid use of the same names as local variables and other method arguments.
This commit is contained in:
parent
cd7b8a03f5
commit
31a313d470
@ -165,5 +165,5 @@ int cmCPackBundleGenerator::PackageFiles()
|
|||||||
cmSystemTools::SetPermissions(command_target.str().c_str(), 0777);
|
cmSystemTools::SetPermissions(command_target.str().c_str(), 0777);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this->CreateDMG(toplevel.c_str(), packageFileNames[0].c_str());
|
return this->CreateDMG();
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ const char* cmCPackDragNDropGenerator::GetOutputExtension()
|
|||||||
int cmCPackDragNDropGenerator::PackageFiles()
|
int cmCPackDragNDropGenerator::PackageFiles()
|
||||||
{
|
{
|
||||||
|
|
||||||
return this->CreateDMG(toplevel, packageFileNames[0]);
|
return this->CreateDMG();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@ -159,8 +159,7 @@ bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command,
|
|||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
int cmCPackDragNDropGenerator::CreateDMG(const std::string& toplevel,
|
int cmCPackDragNDropGenerator::CreateDMG()
|
||||||
const std::string& outFileName)
|
|
||||||
{
|
{
|
||||||
// Get optional arguments ...
|
// Get optional arguments ...
|
||||||
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
|
const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON")
|
||||||
@ -473,7 +472,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& toplevel,
|
|||||||
final_image_command << cpack_dmg_format;
|
final_image_command << cpack_dmg_format;
|
||||||
final_image_command << " -imagekey";
|
final_image_command << " -imagekey";
|
||||||
final_image_command << " zlib-level=9";
|
final_image_command << " zlib-level=9";
|
||||||
final_image_command << " -o \"" << outFileName << "\"";
|
final_image_command << " -o \"" << packageFileNames[0] << "\"";
|
||||||
|
|
||||||
if(!this->RunCommand(final_image_command))
|
if(!this->RunCommand(final_image_command))
|
||||||
{
|
{
|
||||||
|
@ -34,8 +34,7 @@ protected:
|
|||||||
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
|
bool CopyFile(cmOStringStream& source, cmOStringStream& target);
|
||||||
bool RunCommand(cmOStringStream& command, std::string* output = 0);
|
bool RunCommand(cmOStringStream& command, std::string* output = 0);
|
||||||
|
|
||||||
virtual int CreateDMG(const std::string& installdir,
|
int CreateDMG();
|
||||||
const std::string& outdmg);
|
|
||||||
|
|
||||||
std::string InstallPrefix;
|
std::string InstallPrefix;
|
||||||
};
|
};
|
||||||
|
@ -331,13 +331,13 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
{
|
{
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Find files" << std::endl);
|
||||||
cmsys::Glob gl;
|
cmsys::Glob gl;
|
||||||
std::string toplevel = it->c_str();
|
std::string top = it->c_str();
|
||||||
it ++;
|
it ++;
|
||||||
std::string subdir = it->c_str();
|
std::string subdir = it->c_str();
|
||||||
std::string findExpr = toplevel;
|
std::string findExpr = top;
|
||||||
findExpr += "/*";
|
findExpr += "/*";
|
||||||
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
cmCPackLogger(cmCPackLog::LOG_OUTPUT,
|
||||||
"- Install directory: " << toplevel << std::endl);
|
"- Install directory: " << top << std::endl);
|
||||||
gl.RecurseOn();
|
gl.RecurseOn();
|
||||||
if ( !gl.FindFiles(findExpr) )
|
if ( !gl.FindFiles(findExpr) )
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ int cmCPackGenerator::InstallProjectViaInstalledDirectories(
|
|||||||
}
|
}
|
||||||
std::string filePath = tempDir;
|
std::string filePath = tempDir;
|
||||||
filePath += "/" + subdir + "/"
|
filePath += "/" + subdir + "/"
|
||||||
+ cmSystemTools::RelativePath(toplevel.c_str(), gfit->c_str());
|
+ cmSystemTools::RelativePath(top.c_str(), gfit->c_str());
|
||||||
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Copy file: "
|
||||||
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
<< inFile.c_str() << " -> " << filePath.c_str() << std::endl);
|
||||||
if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(),
|
if ( !cmSystemTools::CopyFileIfDifferent(inFile.c_str(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user