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 | f87360b78142e49a930ed23868726e279da28abd (patch) | |
tree | ce130673dcd3e5ca2f6f713c42bc39e6cbd4176c /Source/cmGeneratorTarget.cxx | |
parent | 227018866226afaac741fcd00ec3cc9579163b55 (diff) | |
parent | cd33bfcad57eca7c32d3f8e3260d9a6682c5d516 (diff) | |
download | CMake-f87360b78142e49a930ed23868726e279da28abd.zip CMake-f87360b78142e49a930ed23868726e279da28abd.tar.gz CMake-f87360b78142e49a930ed23868726e279da28abd.tar.bz2 |
Merge topic 'per-config-source-TARGET_FILE'
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/cmGeneratorTarget.cxx')
-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 1ed82fd..fcfcc53 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -3103,12 +3103,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()); + } } } |