diff options
author | Brad King <brad.king@kitware.com> | 2020-10-26 14:28:09 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-10-26 14:28:30 (GMT) |
commit | a1fe3be2bf93d5ff145ede509db6c454870d979f (patch) | |
tree | 390f450b835f85f5fc21fad2ceff775974a7d6e4 /Source | |
parent | 6335b67c802c255d1b133238af234c77c00bf0ef (diff) | |
parent | cd33bfcad57eca7c32d3f8e3260d9a6682c5d516 (diff) | |
download | CMake-a1fe3be2bf93d5ff145ede509db6c454870d979f.zip CMake-a1fe3be2bf93d5ff145ede509db6c454870d979f.tar.gz CMake-a1fe3be2bf93d5ff145ede509db6c454870d979f.tar.bz2 |
Merge topic 'per-config-source-TARGET_FILE' into release-3.19
cd33bfcad5 add_custom_command: Properly recognize if sources depend on config
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5410
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index bdea9fa..3560739 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3098,12 +3098,17 @@ void cmTargetTraceDependencies::CheckCustomCommand(cmCustomCommand const& cc) } // Check for target references in generator expressions. - for (std::string const& cl : cCmdLine) { - const std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cl); - cge->SetQuiet(true); - cge->Evaluate(this->GeneratorTarget->GetLocalGenerator(), ""); - std::set<cmGeneratorTarget*> geTargets = cge->GetTargets(); - targets.insert(geTargets.begin(), geTargets.end()); + std::vector<std::string> const& configs = + this->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); + for (std::string const& c : configs) { + for (std::string const& cl : cCmdLine) { + const std::unique_ptr<cmCompiledGeneratorExpression> cge = + ge.Parse(cl); + cge->SetQuiet(true); + cge->Evaluate(this->GeneratorTarget->GetLocalGenerator(), c); + std::set<cmGeneratorTarget*> geTargets = cge->GetTargets(); + targets.insert(geTargets.begin(), geTargets.end()); + } } } |