浏览代码

cmNinjaTargetGenerator: Remove GetSourceFilePath call with different semantics

Reference external object files using `ConvertToNinjaPath` directly.
`GetSourceFilePath` is meant to reference source files to be compiled.
Brad King 4 年之前
父节点
当前提交
0f2b1c9d1b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Source/cmNinjaTargetGenerator.cxx

+ 1 - 1
Source/cmNinjaTargetGenerator.cxx

@@ -987,7 +987,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatements(
     this->GeneratorTarget->GetExternalObjects(externalObjects, config);
     for (cmSourceFile const* sf : externalObjects) {
       auto objectFileName = this->GetGlobalGenerator()->ExpandCFGIntDir(
-        this->GetSourceFilePath(sf), config);
+        this->ConvertToNinjaPath(sf->GetFullPath()), config);
       if (!cmSystemTools::StringEndsWith(objectFileName,
                                          cmToCStr(pchExtension))) {
         this->Configs[config].Objects.push_back(objectFileName);