cmLocalGenerator: fix destination path construction for PCH/PDB copying

This commit is contained in:
Eduard Voronkin authored and Ben Boeckel committed 2025-08-11 00:03:17 -04:00
1 parent 9eb1c56a84
commit f0d8606267
1 file changed
+3 -4
+3 -4
View File
@@ -2939,10 +2939,9 @@ void cmLocalGenerator::CopyPchCompilePdb(
std::string const from_file =
replaceExtension(reuseTarget->GetCompilePDBPath(config), extension);
std::string const to_dir = target->GetCompilePDBDirectory(config);
std::string const to_file = cmStrCat(
replaceExtension(reuseTarget->GetCompilePDBName(config), extension),
'/');
std::string const dest_file = cmStrCat(to_dir, to_file);
std::string const to_file =
replaceExtension(reuseTarget->GetCompilePDBName(config), extension);
std::string const dest_file = cmStrCat(to_dir, '/', to_file);
file << "foreach(retry RANGE 1 30)\n";
file << " if (EXISTS \"" << from_file << "\" AND (NOT EXISTS \""