From f6cb1e646ca108125c33419e0829c152effaee47 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Tue, 19 May 2020 23:39:38 +0200 Subject: Multi-Ninja: Fix PCHs for Visual C++ Fixes: #20711 --- Source/cmLocalGenerator.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Source/cmLocalGenerator.cxx') 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("$<$:", pchFile, ">")); } else { auto reuseTarget = this->GlobalGenerator->FindGeneratorTarget(*ReuseFrom); -- cgit v1.2.1