summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaUtilityTargetGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-18 21:13:50 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-24 07:19:53 (GMT)
commit80de856bb5cba20d424b91e4a49fe8fdb1f904a3 (patch)
tree882998e96efb8b06f7b750729995b83b480a4c29 /Source/cmNinjaUtilityTargetGenerator.cxx
parent4c41e74da58b6f1057466e7eaa22942dc62c8802 (diff)
downloadCMake-80de856bb5cba20d424b91e4a49fe8fdb1f904a3.zip
CMake-80de856bb5cba20d424b91e4a49fe8fdb1f904a3.tar.gz
CMake-80de856bb5cba20d424b91e4a49fe8fdb1f904a3.tar.bz2
Ninja: Port to cmGeneratorTarget.
Diffstat (limited to 'Source/cmNinjaUtilityTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaUtilityTargetGenerator.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/Source/cmNinjaUtilityTargetGenerator.cxx b/Source/cmNinjaUtilityTargetGenerator.cxx
index 5bbe268..b2a5334 100644
--- a/Source/cmNinjaUtilityTargetGenerator.cxx
+++ b/Source/cmNinjaUtilityTargetGenerator.cxx
@@ -16,7 +16,6 @@
#include "cmGlobalNinjaGenerator.h"
#include "cmMakefile.h"
#include "cmSourceFile.h"
-#include "cmTarget.h"
#include "cmCustomCommandGenerator.h"
cmNinjaUtilityTargetGenerator::cmNinjaUtilityTargetGenerator(
@@ -34,8 +33,8 @@ void cmNinjaUtilityTargetGenerator::Generate()
cmNinjaDeps deps, outputs, util_outputs(1, utilCommandName);
const std::vector<cmCustomCommand> *cmdLists[2] = {
- &this->GetTarget()->GetPreBuildCommands(),
- &this->GetTarget()->GetPostBuildCommands()
+ &this->GetGeneratorTarget()->Target->GetPreBuildCommands(),
+ &this->GetGeneratorTarget()->Target->GetPostBuildCommands()
};
bool uses_terminal = false;
@@ -66,7 +65,8 @@ void cmNinjaUtilityTargetGenerator::Generate()
{
cmCustomCommandGenerator ccg(*cc, this->GetConfigName(),
this->GetLocalGenerator());
- this->GetLocalGenerator()->AddCustomCommandTarget(cc, this->GetTarget());
+ this->GetLocalGenerator()->AddCustomCommandTarget(cc,
+ this->GetGeneratorTarget());
// Depend on all custom command outputs.
const std::vector<std::string>& ccOutputs = ccg.GetOutputs();
@@ -78,8 +78,10 @@ void cmNinjaUtilityTargetGenerator::Generate()
}
}
- this->GetLocalGenerator()->AppendTargetOutputs(this->GetTarget(), outputs);
- this->GetLocalGenerator()->AppendTargetDepends(this->GetTarget(), deps);
+ this->GetLocalGenerator()->AppendTargetOutputs(this->GetGeneratorTarget(),
+ outputs);
+ this->GetLocalGenerator()->AppendTargetDepends(this->GetGeneratorTarget(),
+ deps);
if (commands.empty()) {
this->GetGlobalGenerator()->WritePhonyBuild(this->GetBuildFileStream(),
@@ -140,5 +142,5 @@ void cmNinjaUtilityTargetGenerator::Generate()
}
this->GetGlobalGenerator()->AddTargetAlias(this->GetTargetName(),
- this->GetTarget());
+ this->GetGeneratorTarget());
}