Pārlūkot izejas kodu

PCH: No repeated path for internal generated PCH files (MSVC case)

Fixes: #19952
Cristian Adam 6 gadi atpakaļ
vecāks
revīzija
07fe1bcd4e
1 mainītis faili ar 2 papildinājumiem un 1 dzēšanām
  1. 2 1
      Source/cmLocalGenerator.cxx

+ 2 - 1
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;
     }