summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorNicolas Despres <nicolas.despres@gmail.com>2016-05-13 21:42:02 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-17 13:34:07 (GMT)
commit3b3ecdfa4872a86dcb8eb7d5f5478259890d4707 (patch)
treec1d943ce804246d25d34eefd363136f8949a391f /Source/cmGlobalNinjaGenerator.cxx
parent5ca72750c8de3c1c925c433293eb3bc6b3ea234c (diff)
downloadCMake-3b3ecdfa4872a86dcb8eb7d5f5478259890d4707.zip
CMake-3b3ecdfa4872a86dcb8eb7d5f5478259890d4707.tar.gz
CMake-3b3ecdfa4872a86dcb8eb7d5f5478259890d4707.tar.bz2
Ninja: Pre-compute "all" build target name
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index a8e02e1..864cd2b 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -488,6 +488,8 @@ void cmGlobalNinjaGenerator::Generate()
this->OpenBuildFileStream();
this->OpenRulesFileStream();
+ this->TargetAll = "all";
+
this->PolicyCMP0058 =
this->LocalGenerators[0]->GetMakefile()->GetPolicyStatus(
cmPolicies::CMP0058);
@@ -1059,7 +1061,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
// should all match now.
std::vector<std::string> unknownExplicitDepends;
- this->CombinedCustomCommandExplicitDependencies.erase("all");
+ this->CombinedCustomCommandExplicitDependencies.erase(this->TargetAll);
std::set_difference(this->CombinedCustomCommandExplicitDependencies.begin(),
this->CombinedCustomCommandExplicitDependencies.end(),
@@ -1125,7 +1127,7 @@ void cmGlobalNinjaGenerator::WriteBuiltinTargets(std::ostream& os)
void cmGlobalNinjaGenerator::WriteTargetAll(std::ostream& os)
{
cmNinjaDeps outputs;
- outputs.push_back("all");
+ outputs.push_back(this->TargetAll);
this->WritePhonyBuild(os, "The main all target.", outputs,
this->AllDependencies);