From 07fe1bcd4ed899e71ec4d73284d0d6249f43fd72 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Thu, 16 Jan 2020 17:05:05 +0100 Subject: PCH: No repeated path for internal generated PCH files (MSVC case) Fixes: #19952 --- Source/cmLocalGenerator.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index fca04a8..ffd46d4 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -3167,7 +3167,8 @@ std::string cmLocalGenerator::GetObjectFileNameWithoutTarget( // CMakeFiles/.dir/CMakeFiles/.dir/generated_source_file.obj const char* unitySourceFile = source.GetProperty("UNITY_SOURCE_FILE"); const char* pchExtension = source.GetProperty("PCH_EXTENSION"); - if (unitySourceFile || pchExtension) { + const bool isPchObject = objectName.find("cmake_pch") != std::string::npos; + if (unitySourceFile || pchExtension || isPchObject) { if (pchExtension) { customOutputExtension = pchExtension; } -- cgit v0.12