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
This commit is contained in:
Craig Scott 2020-01-19 20:10:07 +00:00 committed by Kitware Robot
commit 6bd07b9de1

View File

@ -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;
}