cmNinjaTargetGenerator: Remove GetSourceFilePath call with different semantics

Reference external object files using `ConvertToNinjaPath` directly.
`GetSourceFilePath` is meant to reference source files to be compiled.
This commit is contained in:
Brad King
2021-05-20 14:16:09 -04:00
parent dfc98774a2
commit 0f2b1c9d1b

View File

@@ -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);