summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2020-01-19 20:10:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-01-19 20:10:17 (GMT)
commit6bd07b9de17bfcface723bbea648971dbcd7310e (patch)
tree5a9ce39820a899dd7b97f1f71eb0b18051d31057
parentcd08cb7b8cdfec8c72f0e8cb52726c4fa46aff78 (diff)
parent07fe1bcd4ed899e71ec4d73284d0d6249f43fd72 (diff)
downloadCMake-6bd07b9de17bfcface723bbea648971dbcd7310e.zip
CMake-6bd07b9de17bfcface723bbea648971dbcd7310e.tar.gz
CMake-6bd07b9de17bfcface723bbea648971dbcd7310e.tar.bz2
Merge topic 'pch-msvc-no-path-repetition'
07fe1bcd4e PCH: No repeated path for internal generated PCH files (MSVC case) Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4236
-rw-r--r--Source/cmLocalGenerator.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 18f82dd..cc07b11 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -3276,7 +3276,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;
}