mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 04:09:33 -05:00
cmGlobalGenerator: Simplify CheckTargetsForMissingSources
Use `GetAllConfigSources` instead of collecting all configurations ourselves.
This commit is contained in:
@@ -309,17 +309,7 @@ bool cmGlobalGenerator::CheckTargetsForMissingSources() const
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> configs =
|
if (target->GetAllConfigSources().empty()) {
|
||||||
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()) {
|
|
||||||
std::ostringstream e;
|
std::ostringstream e;
|
||||||
e << "No SOURCES given to target: " << target->GetName();
|
e << "No SOURCES given to target: " << target->GetName();
|
||||||
this->GetCMakeInstance()->IssueMessage(
|
this->GetCMakeInstance()->IssueMessage(
|
||||||
|
|||||||
Reference in New Issue
Block a user