ソースを参照

cmTarget: Join strings conditionally.

Stephen Kelly 10 年 前
コミット
01e666c70e
1 ファイル変更2 行追加2 行削除
  1. 2 2
      Source/cmTarget.cxx

+ 2 - 2
Source/cmTarget.cxx

@@ -768,9 +768,9 @@ void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
 //----------------------------------------------------------------------------
 void cmTarget::AddTracedSources(std::vector<std::string> const& srcs)
 {
-  std::string srcFiles = cmJoin(srcs, ";");
-  if (!srcFiles.empty())
+  if (!srcs.empty())
     {
+    std::string srcFiles = cmJoin(srcs, ";");
     this->Internal->SourceFilesMap.clear();
     this->LinkImplementationLanguageIsContextDependent = true;
     cmListFileBacktrace lfbt = this->Makefile->GetBacktrace();