mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
PCH: Add missing dependency of REUSE_FROM shared compiler PDB
Have the `copy_pdb_idb` script depend on the PCH file so that the shared compiler PDB is updated when the PCH is rebuilt. Fixes: #25240
This commit is contained in:
committed by
Brad King
parent
91585ad105
commit
37d994294b
@@ -2770,10 +2770,10 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
||||
}
|
||||
|
||||
if (editAndContinueDebugInfo || msvc2008OrLess) {
|
||||
this->CopyPchCompilePdb(config, target, *ReuseFrom,
|
||||
this->CopyPchCompilePdb(config, lang, target, *ReuseFrom,
|
||||
reuseTarget, { ".pdb", ".idb" });
|
||||
} else if (programDatabaseDebugInfo) {
|
||||
this->CopyPchCompilePdb(config, target, *ReuseFrom,
|
||||
this->CopyPchCompilePdb(config, lang, target, *ReuseFrom,
|
||||
reuseTarget, { ".pdb" });
|
||||
}
|
||||
}
|
||||
@@ -2830,9 +2830,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
||||
}
|
||||
|
||||
void cmLocalGenerator::CopyPchCompilePdb(
|
||||
const std::string& config, cmGeneratorTarget* target,
|
||||
const std::string& ReuseFrom, cmGeneratorTarget* reuseTarget,
|
||||
const std::vector<std::string>& extensions)
|
||||
const std::string& config, const std::string& language,
|
||||
cmGeneratorTarget* target, const std::string& ReuseFrom,
|
||||
cmGeneratorTarget* reuseTarget, const std::vector<std::string>& extensions)
|
||||
{
|
||||
const std::string pdb_prefix =
|
||||
this->GetGlobalGenerator()->IsMultiConfig() ? cmStrCat(config, "/") : "";
|
||||
@@ -2916,6 +2916,7 @@ void cmLocalGenerator::CopyPchCompilePdb(
|
||||
cc->SetCommandLines(commandLines);
|
||||
cc->SetComment(no_message);
|
||||
cc->SetStdPipesUTF8(true);
|
||||
cc->AppendDepends({ reuseTarget->GetPchFile(config, language) });
|
||||
|
||||
if (this->GetGlobalGenerator()->IsVisualStudio()) {
|
||||
cc->SetByproducts(outputs);
|
||||
|
||||
@@ -649,7 +649,9 @@ private:
|
||||
bool AllAppleArchSysrootsAreTheSame(const std::vector<std::string>& archs,
|
||||
cmValue sysroot);
|
||||
|
||||
void CopyPchCompilePdb(const std::string& config, cmGeneratorTarget* target,
|
||||
void CopyPchCompilePdb(const std::string& config,
|
||||
const std::string& language,
|
||||
cmGeneratorTarget* target,
|
||||
const std::string& ReuseFrom,
|
||||
cmGeneratorTarget* reuseTarget,
|
||||
std::vector<std::string> const& extensions);
|
||||
|
||||
Reference in New Issue
Block a user