summaryrefslogtreecommitdiff
path: root/Source/cmLocalGenerator.cxx
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2020-05-19 23:39:38 +0200
committerCristian Adam <cristian.adam@gmail.com>2020-05-20 11:20:38 +0200
commitf6cb1e646ca108125c33419e0829c152effaee47 (patch)
tree80f043f982539f61cbb9439770d9425c11840e79 /Source/cmLocalGenerator.cxx
parent2f3a356ea8dd8305ce4360c1652e2e5abfa9f1cf (diff)
downloadcmake-f6cb1e646ca108125c33419e0829c152effaee47.tar.gz
Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r--Source/cmLocalGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index f29c682f80..ad1cbd8018 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2633,7 +2633,9 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target)
// Exclude the pch files from linking
if (this->Makefile->IsOn("CMAKE_LINK_PCH")) {
if (!ReuseFrom) {
- pch_sf->SetProperty("OBJECT_OUTPUTS", pchFile.c_str());
+ pch_sf->AppendProperty(
+ "OBJECT_OUTPUTS",
+ cmStrCat("$<$<CONFIG:", config, ">:", pchFile, ">"));
} else {
auto reuseTarget =
this->GlobalGenerator->FindGeneratorTarget(*ReuseFrom);