summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-01-19 20:10:07 +0000
committerKitware Robot <kwrobot@kitware.com>2020-01-19 15:10:17 -0500
commit582cc710c2a4d245a2ec1cfef0b048482333e54a (patch)
tree42822ded1b5fc6d15d0fb60238b8f2739c5b53c8 /Source
parent4c907eae69b4d76b19604dd9cc3bedf1a929828f (diff)
parent07fe1bcd4ed899e71ec4d73284d0d6249f43fd72 (diff)
downloadcmake-582cc710c2a4d245a2ec1cfef0b048482333e54a.tar.gz
Merge topic 'pch-msvc-no-path-repetition' into release-3.16
07fe1bcd4e PCH: No repeated path for internal generated PCH files (MSVC case) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4236
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index fca04a85c2..ffd46d4544 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;
}