Commit 0397c92a authored by Nicolas Despres's avatar Nicolas Despres Committed by Brad King
Browse files

Ninja: Pre-compute "CMakeCache.txt" build target name

parent 3b3ecdfa
......@@ -489,6 +489,7 @@ void cmGlobalNinjaGenerator::Generate()
this->OpenRulesFileStream();
this->TargetAll = "all";
this->CMakeCacheFile = "CMakeCache.txt";
this->PolicyCMP0058 =
this->LocalGenerators[0]->GetMakefile()->GetPolicyStatus(
......@@ -1040,7 +1041,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
}
}
}
knownDependencies.insert("CMakeCache.txt");
knownDependencies.insert(this->CMakeCacheFile);
for (TargetAliasMap::const_iterator i = this->TargetAliases.begin();
i != this->TargetAliases.end(); ++i) {
......@@ -1168,7 +1169,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
implicitDeps.push_back(this->ConvertToNinjaPath(*fi));
}
}
implicitDeps.push_back("CMakeCache.txt");
implicitDeps.push_back(this->CMakeCacheFile);
std::sort(implicitDeps.begin(), implicitDeps.end());
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
......
......@@ -400,6 +400,7 @@ private:
private:
std::string TargetAll;
std::string CMakeCacheFile;
};
#endif // ! cmGlobalNinjaGenerator_h
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment