cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget.
This commit is contained in:
parent
c8f8f16541
commit
06f56d3bf5
|
@ -1218,11 +1218,11 @@ void
|
||||||
cmLocalUnixMakefileGenerator3
|
cmLocalUnixMakefileGenerator3
|
||||||
::AppendCleanCommand(std::vector<std::string>& commands,
|
::AppendCleanCommand(std::vector<std::string>& commands,
|
||||||
const std::vector<std::string>& files,
|
const std::vector<std::string>& files,
|
||||||
cmTarget& target, const char* filename)
|
cmGeneratorTarget* target, const char* filename)
|
||||||
{
|
{
|
||||||
std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
|
std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
|
||||||
cleanfile += "/";
|
cleanfile += "/";
|
||||||
cleanfile += this->GetTargetDirectory(target);
|
cleanfile += this->GetTargetDirectory(target->Target);
|
||||||
cleanfile += "/cmake_clean";
|
cleanfile += "/cmake_clean";
|
||||||
if(filename)
|
if(filename)
|
||||||
{
|
{
|
||||||
|
@ -1256,14 +1256,12 @@ cmLocalUnixMakefileGenerator3
|
||||||
{
|
{
|
||||||
// Get the set of source languages in the target.
|
// Get the set of source languages in the target.
|
||||||
std::set<std::string> languages;
|
std::set<std::string> languages;
|
||||||
cmGeneratorTarget *gtgt =
|
target->GetLanguages(languages,
|
||||||
this->GlobalGenerator->GetGeneratorTarget(&target);
|
|
||||||
gtgt->GetLanguages(languages,
|
|
||||||
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
|
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
|
||||||
fout << "\n"
|
fout << "\n"
|
||||||
<< "# Per-language clean rules from dependency scanning.\n"
|
<< "# Per-language clean rules from dependency scanning.\n"
|
||||||
<< "foreach(lang " << cmJoin(languages, " ") << ")\n"
|
<< "foreach(lang " << cmJoin(languages, " ") << ")\n"
|
||||||
<< " include(" << this->GetTargetDirectory(target)
|
<< " include(" << this->GetTargetDirectory(target->Target)
|
||||||
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
|
<< "/cmake_clean_${lang}.cmake OPTIONAL)\n"
|
||||||
<< "endforeach()\n";
|
<< "endforeach()\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ protected:
|
||||||
std::ostream* content = 0);
|
std::ostream* content = 0);
|
||||||
void AppendCleanCommand(std::vector<std::string>& commands,
|
void AppendCleanCommand(std::vector<std::string>& commands,
|
||||||
const std::vector<std::string>& files,
|
const std::vector<std::string>& files,
|
||||||
cmTarget& target, const char* filename =0);
|
cmGeneratorTarget* target, const char* filename =0);
|
||||||
|
|
||||||
// Helper methods for dependeny updates.
|
// Helper methods for dependeny updates.
|
||||||
bool ScanDependencies(const char* targetDir,
|
bool ScanDependencies(const char* targetDir,
|
||||||
|
|
|
@ -444,7 +444,7 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
|
||||||
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
if(this->Target->GetType() == cmTarget::STATIC_LIBRARY)
|
||||||
{
|
{
|
||||||
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
|
this->LocalGenerator->AppendCleanCommand(commands1, libCleanFiles,
|
||||||
*this->Target, "target");
|
this->GeneratorTarget, "target");
|
||||||
this->LocalGenerator->CreateCDCommand
|
this->LocalGenerator->CreateCDCommand
|
||||||
(commands1,
|
(commands1,
|
||||||
this->Makefile->GetCurrentBinaryDirectory(),
|
this->Makefile->GetCurrentBinaryDirectory(),
|
||||||
|
|
|
@ -932,7 +932,7 @@ void cmMakefileTargetGenerator::WriteTargetCleanRules()
|
||||||
|
|
||||||
// Construct the clean command.
|
// Construct the clean command.
|
||||||
this->LocalGenerator->AppendCleanCommand(commands, this->CleanFiles,
|
this->LocalGenerator->AppendCleanCommand(commands, this->CleanFiles,
|
||||||
*this->Target);
|
this->GeneratorTarget);
|
||||||
this->LocalGenerator->CreateCDCommand
|
this->LocalGenerator->CreateCDCommand
|
||||||
(commands,
|
(commands,
|
||||||
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
this->LocalGenerator->GetCurrentBinaryDirectory(),
|
||||||
|
|
Loading…
Reference in New Issue