diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-06-06 11:02:59 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-22 17:23:45 (GMT) |
commit | dee197fe610b5fe50403da796539b63a74430bd3 (patch) | |
tree | 29b06ec10a8006f1a6747984dd4133089bed91c3 | |
parent | b2b41b83ff594555f3b80c6c2fd12e10e1e97458 (diff) | |
download | CMake-dee197fe610b5fe50403da796539b63a74430bd3.zip CMake-dee197fe610b5fe50403da796539b63a74430bd3.tar.gz CMake-dee197fe610b5fe50403da796539b63a74430bd3.tar.bz2 |
GHS: Use a cmGeneratorTarget in generator API.
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.cxx | 18 | ||||
-rw-r--r-- | Source/cmGhsMultiTargetGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmLocalGhsMultiGenerator.cxx | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx index 01e2011..14efc3e 100644 --- a/Source/cmGhsMultiTargetGenerator.cxx +++ b/Source/cmGhsMultiTargetGenerator.cxx @@ -21,23 +21,24 @@ std::string const cmGhsMultiTargetGenerator::DDOption("-dynamic"); -cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmTarget *target) - : Target(target) +cmGhsMultiTargetGenerator::cmGhsMultiTargetGenerator(cmGeneratorTarget *target) + : Target(target->Target) + , GeneratorTarget(target) , LocalGenerator(static_cast<cmLocalGhsMultiGenerator *>( - target->GetMakefile()->GetLocalGenerator())) - , Makefile(target->GetMakefile()) - , TargetGroup(DetermineIfTargetGroup(target)) + target->GetLocalGenerator())) + , Makefile(target->Target->GetMakefile()) + , TargetGroup(DetermineIfTargetGroup(target->Target)) , DynamicDownload(false) { - this->RelBuildFilePath = this->GetRelBuildFilePath(target); + this->RelBuildFilePath = this->GetRelBuildFilePath(target->Target); this->RelOutputFileName = this->RelBuildFilePath + this->Target->GetName() + ".a"; this->RelBuildFileName = this->RelBuildFilePath; - this->RelBuildFileName += this->GetBuildFileName(target); + this->RelBuildFileName += this->GetBuildFileName(target->Target); - std::string absPathToRoot = this->GetAbsPathToRoot(target); + std::string absPathToRoot = this->GetAbsPathToRoot(target->Target); absPathToRoot = this->AddSlashIfNeededToPath(absPathToRoot); this->AbsBuildFilePath = absPathToRoot + this->RelBuildFilePath; this->AbsBuildFileName = absPathToRoot + this->RelBuildFileName; @@ -373,7 +374,6 @@ void cmGhsMultiTargetGenerator::WriteTargetLinkLibraries() cmTarget *tg(GetGlobalGenerator()->FindTarget(libName)); if (NULL != tg) { - cmGhsMultiTargetGenerator gmtg(tg); libName = tg->GetName() + ".a"; } *this->GetFolderBuildStreams() << " -l\"" << libName << "\"" diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h index 8e81db8..c29a31e 100644 --- a/Source/cmGhsMultiTargetGenerator.h +++ b/Source/cmGhsMultiTargetGenerator.h @@ -27,7 +27,7 @@ class cmCustomCommand; class cmGhsMultiTargetGenerator { public: - cmGhsMultiTargetGenerator(cmTarget *target); + cmGhsMultiTargetGenerator(cmGeneratorTarget* target); virtual ~cmGhsMultiTargetGenerator(); @@ -100,6 +100,7 @@ private: const std::string &language); cmTarget *Target; + cmGeneratorTarget* GeneratorTarget; cmLocalGhsMultiGenerator *LocalGenerator; cmMakefile *Makefile; std::string AbsBuildFilePath; diff --git a/Source/cmLocalGhsMultiGenerator.cxx b/Source/cmLocalGhsMultiGenerator.cxx index 870b9b9..8e498dd 100644 --- a/Source/cmLocalGhsMultiGenerator.cxx +++ b/Source/cmLocalGhsMultiGenerator.cxx @@ -37,7 +37,7 @@ void cmLocalGhsMultiGenerator::Generate() { continue; } - cmGhsMultiTargetGenerator tg(l->second->Target); + cmGhsMultiTargetGenerator tg(l->second); tg.Generate(); } } |