summaryrefslogtreecommitdiffstats
path: root/Source/cmLocalUnixMakefileGenerator3.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-10-16 13:35:32 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-10-16 13:35:32 (GMT)
commita4f0b01939ca7c69c1e31f017c6e87b642388252 (patch)
treed89ce881010661abf4fa29151c541a90210a9717 /Source/cmLocalUnixMakefileGenerator3.cxx
parent2f1c3401ec132f0672c108a2312146f39e8f017b (diff)
parent7f5ec9f109dc66bc22ac377a7fb57d9221aed56b (diff)
downloadCMake-a4f0b01939ca7c69c1e31f017c6e87b642388252.zip
CMake-a4f0b01939ca7c69c1e31f017c6e87b642388252.tar.gz
CMake-a4f0b01939ca7c69c1e31f017c6e87b642388252.tar.bz2
Merge topic 'GetTargetDirectory-cmGeneratorTarget'
7f5ec9f1 cmLocalGenerator: Port GetTargetDirectory to cmGeneratorTarget. 06f56d3b cmLocalUnixMakefileGenerator3: Port AppendCleanCommand to cmGeneratorTarget. c8f8f165 cmLocalUnixMakefileGenerator3: Port another API to cmGeneratorTarget. 9f299a12 cmLocalUnixMakefileGenerator3: Port API to cmGenertorTarget.
Diffstat (limited to 'Source/cmLocalUnixMakefileGenerator3.cxx')
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx26
1 files changed, 12 insertions, 14 deletions
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 91c7acd..36602d8 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -191,7 +191,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
std::string dir;
dir += gt->Makefile->GetCurrentBinaryDirectory();
dir += "/";
- dir += this->GetTargetDirectory(*gt->Target);
+ dir += this->GetTargetDirectory(gt);
dir += "/";
// Compute the name of each object file.
for(std::vector<cmSourceFile const*>::iterator
@@ -209,7 +209,7 @@ GetLocalObjectFiles(std::map<std::string, LocalObjectInfo> &localObjectFiles)
}
LocalObjectInfo& info = localObjectFiles[objectName];
info.HasSourceExtension = hasSourceExtension;
- info.push_back(LocalObjectEntry(gt->Target, sf->GetLanguage()));
+ info.push_back(LocalObjectEntry(gt, sf->GetLanguage()));
}
}
}
@@ -389,7 +389,7 @@ cmLocalUnixMakefileGenerator3
t != info.end(); ++t)
{
std::string tgtMakefileName =
- this->GetRelativeTargetDirectory(*(t->Target));
+ this->GetRelativeTargetDirectory(t->Target);
std::string targetName = tgtMakefileName;
tgtMakefileName += "/build.make";
targetName += "/";
@@ -438,7 +438,7 @@ void cmLocalUnixMakefileGenerator3
emitted.insert(t->second->GetName());
// for subdirs add a rule to build this specific target by name.
- localName = this->GetRelativeTargetDirectory(*t->second->Target);
+ localName = this->GetRelativeTargetDirectory(t->second);
localName += "/rule";
commands.clear();
depends.clear();
@@ -465,11 +465,11 @@ void cmLocalUnixMakefileGenerator3
// Add a fast rule to build the target
std::string makefileName =
- this->GetRelativeTargetDirectory(*t->second->Target);
+ this->GetRelativeTargetDirectory(t->second);
makefileName += "/build.make";
// make sure the makefile name is suitable for a makefile
std::string makeTargetName =
- this->GetRelativeTargetDirectory(*t->second->Target);
+ this->GetRelativeTargetDirectory(t->second);
makeTargetName += "/build";
localName = t->second->GetName();
localName += "/fast";
@@ -487,7 +487,7 @@ void cmLocalUnixMakefileGenerator3
// installation.
if(t->second->NeedRelinkBeforeInstall(this->ConfigName))
{
- makeTargetName = this->GetRelativeTargetDirectory(*t->second->Target);
+ makeTargetName = this->GetRelativeTargetDirectory(t->second);
makeTargetName += "/preinstall";
localName = t->second->GetName();
localName += "/preinstall";
@@ -933,7 +933,7 @@ cmLocalUnixMakefileGenerator3
//----------------------------------------------------------------------------
std::string
cmLocalUnixMakefileGenerator3
-::GetRelativeTargetDirectory(cmTarget const& target)
+::GetRelativeTargetDirectory(cmGeneratorTarget* target)
{
std::string dir = this->HomeRelativeOutputPath;
dir += this->GetTargetDirectory(target);
@@ -1218,7 +1218,7 @@ void
cmLocalUnixMakefileGenerator3
::AppendCleanCommand(std::vector<std::string>& commands,
const std::vector<std::string>& files,
- cmTarget& target, const char* filename)
+ cmGeneratorTarget* target, const char* filename)
{
std::string cleanfile = this->Makefile->GetCurrentBinaryDirectory();
cleanfile += "/";
@@ -1256,9 +1256,7 @@ cmLocalUnixMakefileGenerator3
{
// Get the set of source languages in the target.
std::set<std::string> languages;
- cmGeneratorTarget *gtgt =
- this->GlobalGenerator->GetGeneratorTarget(&target);
- gtgt->GetLanguages(languages,
+ target->GetLanguages(languages,
this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"));
fout << "\n"
<< "# Per-language clean rules from dependency scanning.\n"
@@ -2284,10 +2282,10 @@ cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
//----------------------------------------------------------------------------
std::string
cmLocalUnixMakefileGenerator3
-::GetTargetDirectory(cmTarget const& target) const
+::GetTargetDirectory(cmGeneratorTarget const* target) const
{
std::string dir = cmake::GetCMakeFilesDirectoryPostSlash();
- dir += target.GetName();
+ dir += target->GetName();
#if defined(__VMS)
dir += "_dir";
#else