diff options
author | Andreas Schönle <a.schoenle@abberior-instruments.com> | 2020-05-07 07:39:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-07 13:58:44 (GMT) |
commit | 605d6c65c9ecf0128f706b0790b4950da231eb3e (patch) | |
tree | 5e3795aff9ebc96f0069a745a4c5752dc9760969 /Source/cmLocalGenerator.cxx | |
parent | 8406f71eae5e3e62e5b23885ad2eaba80c72fefb (diff) | |
download | CMake-605d6c65c9ecf0128f706b0790b4950da231eb3e.zip CMake-605d6c65c9ecf0128f706b0790b4950da231eb3e.tar.gz CMake-605d6c65c9ecf0128f706b0790b4950da231eb3e.tar.bz2 |
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
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index b862449..9aca775 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2732,9 +2732,11 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target) std::string pchSourceObj = reuseTarget->GetPchFileObject(config, lang, arch); + 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); |