diff options
author | Brad King <brad.king@kitware.com> | 2020-07-23 12:25:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-23 12:27:17 (GMT) |
commit | 369ba2f4e2a3f37c2bb29b768933e8c7d68d815f (patch) | |
tree | 97833ba08cfdd467fe3ae9f5b03bf9acd8871c4d | |
parent | 733edddf5c5b98fcb2db31d8566ad4c642607b17 (diff) | |
parent | 634c461b22ed92c6d5b0ca34dfa4979cebe3bf22 (diff) | |
download | CMake-369ba2f4e2a3f37c2bb29b768933e8c7d68d815f.zip CMake-369ba2f4e2a3f37c2bb29b768933e8c7d68d815f.tar.gz CMake-369ba2f4e2a3f37c2bb29b768933e8c7d68d815f.tar.bz2 |
Merge topic 'simplify-sources-check'
634c461b22 cmGlobalGenerator: Simplify CheckTargetsForMissingSources
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5043
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index d39fefa..5c07e31 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -309,17 +309,7 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const continue; } - std::vector<std::string> configs = - target->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); - std::vector<cmSourceFile*> srcs; - for (std::string const& config : configs) { - target->GetSourceFiles(srcs, config); - if (!srcs.empty()) { - break; - } - } - - if (srcs.empty()) { + if (target->GetAllConfigSources().empty()) { std::ostringstream e; e << "No SOURCES given to target: " << target->GetName(); this->GetCMakeInstance()->IssueMessage( |