From 634c461b22ed92c6d5b0ca34dfa4979cebe3bf22 Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 20 Jul 2020 13:39:45 -0400 Subject: cmGlobalGenerator: Simplify CheckTargetsForMissingSources Use `GetAllConfigSources` instead of collecting all configurations ourselves. --- Source/cmGlobalGenerator.cxx | 12 +----------- 1 file changed, 1 insertion(+), 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 configs = - target->Makefile->GetGeneratorConfigs(cmMakefile::IncludeEmptyConfig); - std::vector 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( -- cgit v0.12