mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
PCH: Fix REUSE_FROM in multi-config generators
Since commit a55df20499 (Multi-Ninja: Add precompile headers support,
2020-01-10, v3.17.0-rc1~136^2) the re-used PCH file object is added
once for each configuration to flags used for all configurations.
Put it in the flags for only the corresponding configuration instead.
Fixes: #20680
This commit is contained in:
committed by
Brad King
parent
615129f3eb
commit
7a1c7736cb
@@ -2604,9 +2604,11 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
|
||||
std::string pchSourceObj =
|
||||
reuseTarget->GetPchFileObject(config, lang);
|
||||
|
||||
const std::string configUpper = cmSystemTools::UpperCase(config);
|
||||
|
||||
// Link to the pch object file
|
||||
target->Target->AppendProperty(
|
||||
"LINK_FLAGS",
|
||||
cmStrCat("LINK_FLAGS_", configUpper),
|
||||
cmStrCat(" ", this->ConvertToOutputFormat(pchSourceObj, SHELL)),
|
||||
true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user