Ninja: Pre-compute "CMakeCache.txt" build target name
This commit is contained in:
parent
3b3ecdfa48
commit
0397c92a15
|
@ -489,6 +489,7 @@ void cmGlobalNinjaGenerator::Generate()
|
||||||
this->OpenRulesFileStream();
|
this->OpenRulesFileStream();
|
||||||
|
|
||||||
this->TargetAll = "all";
|
this->TargetAll = "all";
|
||||||
|
this->CMakeCacheFile = "CMakeCache.txt";
|
||||||
|
|
||||||
this->PolicyCMP0058 =
|
this->PolicyCMP0058 =
|
||||||
this->LocalGenerators[0]->GetMakefile()->GetPolicyStatus(
|
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();
|
for (TargetAliasMap::const_iterator i = this->TargetAliases.begin();
|
||||||
i != this->TargetAliases.end(); ++i) {
|
i != this->TargetAliases.end(); ++i) {
|
||||||
|
@ -1168,7 +1169,7 @@ void cmGlobalNinjaGenerator::WriteTargetRebuildManifest(std::ostream& os)
|
||||||
implicitDeps.push_back(this->ConvertToNinjaPath(*fi));
|
implicitDeps.push_back(this->ConvertToNinjaPath(*fi));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
implicitDeps.push_back("CMakeCache.txt");
|
implicitDeps.push_back(this->CMakeCacheFile);
|
||||||
|
|
||||||
std::sort(implicitDeps.begin(), implicitDeps.end());
|
std::sort(implicitDeps.begin(), implicitDeps.end());
|
||||||
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
|
implicitDeps.erase(std::unique(implicitDeps.begin(), implicitDeps.end()),
|
||||||
|
|
|
@ -400,6 +400,7 @@ private:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string TargetAll;
|
std::string TargetAll;
|
||||||
|
std::string CMakeCacheFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ! cmGlobalNinjaGenerator_h
|
#endif // ! cmGlobalNinjaGenerator_h
|
||||||
|
|
Loading…
Reference in New Issue