summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-20 17:39:45 (GMT)
committerBrad King <brad.king@kitware.com>2020-07-22 17:48:11 (GMT)
commit634c461b22ed92c6d5b0ca34dfa4979cebe3bf22 (patch)
tree370acd85c28c6a4e7b0c0b528eabed498791855c /Source/cmGlobalGenerator.cxx
parentd45f0d719e0be324959d7ba5e9d84596592fc19a (diff)
downloadCMake-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.cxx12
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(