summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-12 11:58:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-12 11:59:10 (GMT)
commita10ce3931a5759abf94d14357b340471d71f6b3b (patch)
tree0438987ec0c5f1e513aa4f3feac893a209c3ef63
parent5477afd920f323ff0f0aab55e89cb258f2c1d5c2 (diff)
parent37d994294ba5af61395289380e9cf64ed3046e59 (diff)
downloadCMake-a10ce3931a5759abf94d14357b340471d71f6b3b.zip
CMake-a10ce3931a5759abf94d14357b340471d71f6b3b.tar.gz
CMake-a10ce3931a5759abf94d14357b340471d71f6b3b.tar.bz2
Merge topic 'pch-reuse-pdb-dependency'
37d994294b PCH: Add missing dependency of REUSE_FROM shared compiler PDB Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !8787
-rw-r--r--Source/cmLocalGenerator.cxx11
-rw-r--r--Source/cmLocalGenerator.h4
2 files changed, 9 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 6472031..63c8aa8 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -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);
diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index eddc033..a920cfe 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -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);