diff options
author | Kyle Edwards <kyle.edwards@kitware.com> | 2019-11-15 18:01:36 (GMT) |
---|---|---|
committer | Kyle Edwards <kyle.edwards@kitware.com> | 2019-12-13 15:51:46 (GMT) |
commit | 5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2 (patch) | |
tree | 7e456292c9299223c3bd851261595f24371d2f3b /Source/cmGeneratorTarget.cxx | |
parent | 3bc63e99e44b3ef82c19d018f939ea839882a131 (diff) | |
download | CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.zip CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.gz CMake-5a8a9f72293ab1b3fd768ff40e5fb1f07cdb7dd2.tar.bz2 |
Ninja: Add multi-config variant
Co-Authored-by: vector-of-bool <vectorofbool@gmail.com>
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 94ce2e1..19d5b4d 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -649,6 +649,7 @@ void cmGeneratorTarget::ClearSourcesCache() this->KindedSourcesMap.clear(); this->LinkImplementationLanguageIsContextDependent = true; this->Objects.clear(); + this->VisitedConfigsForObjects.clear(); } void cmGeneratorTarget::AddSourceCommon(const std::string& src, bool before) @@ -738,7 +739,7 @@ void cmGeneratorTarget::GetObjectSources( { IMPLEMENT_VISIT(SourceKindObjectSource); - if (!this->Objects.empty()) { + if (this->VisitedConfigsForObjects.count(config)) { return; } @@ -747,16 +748,17 @@ void cmGeneratorTarget::GetObjectSources( } this->LocalGenerator->ComputeObjectFilenames(this->Objects, this); + this->VisitedConfigsForObjects.insert(config); } void cmGeneratorTarget::ComputeObjectMapping() { - if (!this->Objects.empty()) { + auto const& configs = this->Makefile->GetGeneratorConfigs(); + std::set<std::string> configSet(configs.begin(), configs.end()); + if (configSet == this->VisitedConfigsForObjects) { return; } - std::vector<std::string> const& configs = - this->Makefile->GetGeneratorConfigs(); for (std::string const& c : configs) { std::vector<cmSourceFile const*> sourceFiles; this->GetObjectSources(sourceFiles, c); |