summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2020-05-19 21:39:38 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2020-05-20 09:20:38 (GMT)
commitf6cb1e646ca108125c33419e0829c152effaee47 (patch)
tree80f043f982539f61cbb9439770d9425c11840e79 /Source/cmGeneratorTarget.cxx
parent2f3a356ea8dd8305ce4360c1652e2e5abfa9f1cf (diff)
downloadCMake-f6cb1e646ca108125c33419e0829c152effaee47.zip
CMake-f6cb1e646ca108125c33419e0829c152effaee47.tar.gz
CMake-f6cb1e646ca108125c33419e0829c152effaee47.tar.bz2
Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 2f9da1c..917985a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3864,6 +3864,10 @@ std::string cmGeneratorTarget::GetPchFileObject(const std::string& config,
pchSource, false, cmSourceFileLocationKind::Known);
filename = cmStrCat(this->ObjectDirectory, this->GetObjectName(pchSf));
+ if (this->GetGlobalGenerator()->IsMultiConfig()) {
+ cmSystemTools::ReplaceString(
+ filename, this->GetGlobalGenerator()->GetCMakeCFGIntDir(), config);
+ }
}
return inserted.first->second;
}