FASTBuild: fix superfluous directory creation

Fixes: #27356
This commit is contained in:
Eduard Voronkin
2025-11-01 20:45:45 -07:00
committed by Brad King
parent e8863b5a74
commit 2a5855f034

View File

@@ -823,9 +823,10 @@ void cmFastbuildNormalTargetGenerator::ComputePaths(
(needTrailingSlash ? "\\ " : ""));
}
}
std::string impLibFile = ConvertToFastbuildPath(
GeneratorTarget->GetFullPath(Config, cmStateEnums::ImportLibraryArtifact));
cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(impLibFile));
std::string const impLibFullPath =
GeneratorTarget->GetFullPath(Config, cmStateEnums::ImportLibraryArtifact);
std::string impLibFile = ConvertToFastbuildPath(impLibFullPath);
cmSystemTools::MakeDirectory(cmSystemTools::GetFilenamePath(impLibFullPath));
if (!impLibFile.empty()) {
cmSystemTools::ConvertToOutputSlashes(impLibFile);
target.Variables["TargetOutputImplib"] = std::move(impLibFile);