mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-10 15:50:50 -06:00
PCH: No repeated path for internal generated PCH files (MSVC case)
Fixes: #19952
This commit is contained in:
@@ -3167,7 +3167,8 @@ std::string cmLocalGenerator::GetObjectFileNameWithoutTarget(
|
|||||||
// CMakeFiles/<target>.dir/CMakeFiles/<target>.dir/generated_source_file.obj
|
// CMakeFiles/<target>.dir/CMakeFiles/<target>.dir/generated_source_file.obj
|
||||||
const char* unitySourceFile = source.GetProperty("UNITY_SOURCE_FILE");
|
const char* unitySourceFile = source.GetProperty("UNITY_SOURCE_FILE");
|
||||||
const char* pchExtension = source.GetProperty("PCH_EXTENSION");
|
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) {
|
if (pchExtension) {
|
||||||
customOutputExtension = pchExtension;
|
customOutputExtension = pchExtension;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user