cmNinjaTargetGenerator: fix DependInfo.json generation location

Commit aafd771529 (cmNinjaTargetGenerator: use `GetObjectFileDir` where
possible, 2025-05-21) from !10812 accidentally converted the
`GetTargetDependInfoPath` from an always-absolute path to a
relative-for-ninja path. This works fine as everything ended up doing
`ConvertToNinjaPath` as necessary *except* the code which actually wrote
the file. That needs an absolute path in order to generate it in the
correct location.

Fixes: #26983
This commit is contained in:
Ben Boeckel
2025-06-09 21:43:37 +02:00
parent 72f4659697
commit a16566105b

View File

@@ -490,8 +490,9 @@ std::string cmNinjaTargetGenerator::GetDyndepFilePath(
std::string cmNinjaTargetGenerator::GetTargetDependInfoPath(
std::string const& lang, std::string const& config) const
{
return cmStrCat(this->GetObjectFileDir(config), '/', lang,
"DependInfo.json");
return cmStrCat(this->GeneratorTarget->GetSupportDirectory(),
this->GetGlobalGenerator()->ConfigDirectory(config), '/',
lang, "DependInfo.json");
}
std::string cmNinjaTargetGenerator::GetTargetOutputDir(