summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
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/<target>.dir/CMakeFiles/<target>.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;
}