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:55:04 (GMT) |
commit | 7a1c7736cb3f867f916509d38bc88e75eaa7be3f (patch) | |
tree | 6937c310eddaedc31189d9c77ce2611e9f0ef224 | |
parent | 615129f3ebd308abeaaee7f5f0689e7fc4616c28 (diff) | |
download | CMake-7a1c7736cb3f867f916509d38bc88e75eaa7be3f.zip CMake-7a1c7736cb3f867f916509d38bc88e75eaa7be3f.tar.gz CMake-7a1c7736cb3f867f916509d38bc88e75eaa7be3f.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
-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 c2ec5f5..f592b7b 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -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); } |