Просмотр исходного кода

Merge topic 'simplify-sources-check'

634c461b22 cmGlobalGenerator: Simplify CheckTargetsForMissingSources

Acked-by: Kitware Robot <[email protected]>
Merge-request: !5043
Brad King 5 лет назад
Родитель
Сommit
369ba2f4e2
1 измененных файлов с 1 добавлено и 11 удалено
  1. 1 11
      Source/cmGlobalGenerator.cxx

+ 1 - 11
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(