diff options
author | Brad King <brad.king@kitware.com> | 2020-07-20 17:39:45 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-07-22 17:48:11 (GMT) |
commit | 634c461b22ed92c6d5b0ca34dfa4979cebe3bf22 (patch) | |
tree | 370acd85c28c6a4e7b0c0b528eabed498791855c /Source/cmGlobalGenerator.cxx | |
parent | d45f0d719e0be324959d7ba5e9d84596592fc19a (diff) | |
download | CMake-634c461b22ed92c6d5b0ca34dfa4979cebe3bf22.zip CMake-634c461b22ed92c6d5b0ca34dfa4979cebe3bf22.tar.gz CMake-634c461b22ed92c6d5b0ca34dfa4979cebe3bf22.tar.bz2 |
cmGlobalGenerator: Simplify CheckTargetsForMissingSources
Use `GetAllConfigSources` instead of collecting all configurations
ourselves.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-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( |