diff options
author | Cristian Adam <cristian.adam@gmail.com> | 2020-01-16 17:05:05 +0100 |
---|---|---|
committer | Cristian Adam <cristian.adam@gmail.com> | 2020-01-16 17:05:05 +0100 |
commit | 07fe1bcd4ed899e71ec4d73284d0d6249f43fd72 (patch) | |
tree | 186cd93cfd4da868ed8d2e5689452a0853ea10d8 | |
parent | 3b3f2474da6778fcd81875cfff75b113027cf9eb (diff) | |
download | cmake-07fe1bcd4ed899e71ec4d73284d0d6249f43fd72.tar.gz |
PCH: No repeated path for internal generated PCH files (MSVC case)
Fixes: #19952
-rw-r--r-- | Source/cmLocalGenerator.cxx | 3 |
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; } |