Sfoglia il codice sorgente

cmGlobalXCodeGenerator: Mark known source locations

Brad King 6 anni fa
parent
commit
9457c95aa0
1 ha cambiato i file con 8 aggiunte e 4 eliminazioni
  1. 8 4
      Source/cmGlobalXCodeGenerator.cxx

+ 8 - 4
Source/cmGlobalXCodeGenerator.cxx

@@ -896,7 +896,8 @@ void cmGlobalXCodeGenerator::AddXCodeProjBuildRule(
   std::string listfile =
   std::string listfile =
     cmStrCat(target->GetLocalGenerator()->GetCurrentSourceDirectory(),
     cmStrCat(target->GetLocalGenerator()->GetCurrentSourceDirectory(),
              "/CMakeLists.txt");
              "/CMakeLists.txt");
-  cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(listfile);
+  cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(
+    listfile, false, cmSourceFileLocationKind::Known);
   if (!cmContains(sources, srcCMakeLists)) {
   if (!cmContains(sources, srcCMakeLists)) {
     sources.push_back(srcCMakeLists);
     sources.push_back(srcCMakeLists);
   }
   }
@@ -1139,7 +1140,8 @@ bool cmGlobalXCodeGenerator::CreateXCodeTarget(
   // Add the Info.plist we are about to generate for an App Bundle.
   // Add the Info.plist we are about to generate for an App Bundle.
   if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
   if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
     std::string plist = this->ComputeInfoPListLocation(gtgt);
     std::string plist = this->ComputeInfoPListLocation(gtgt);
-    cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(plist, true);
+    cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+      plist, true, cmSourceFileLocationKind::Known);
     classes.push_back(sf);
     classes.push_back(sf);
   }
   }
 
 
@@ -2855,14 +2857,16 @@ bool cmGlobalXCodeGenerator::CreateGroups(
         std::string listfile =
         std::string listfile =
           cmStrCat(gtgt->GetLocalGenerator()->GetCurrentSourceDirectory(),
           cmStrCat(gtgt->GetLocalGenerator()->GetCurrentSourceDirectory(),
                    "/CMakeLists.txt");
                    "/CMakeLists.txt");
-        cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(listfile);
+        cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+          listfile, false, cmSourceFileLocationKind::Known);
         addSourceToGroup(sf->GetFullPath());
         addSourceToGroup(sf->GetFullPath());
       }
       }
 
 
       // Add the Info.plist we are about to generate for an App Bundle.
       // Add the Info.plist we are about to generate for an App Bundle.
       if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
       if (gtgt->GetPropertyAsBool("MACOSX_BUNDLE")) {
         std::string plist = this->ComputeInfoPListLocation(gtgt);
         std::string plist = this->ComputeInfoPListLocation(gtgt);
-        cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(plist, true);
+        cmSourceFile* sf = gtgt->Makefile->GetOrCreateSource(
+          plist, true, cmSourceFileLocationKind::Known);
         addSourceToGroup(sf->GetFullPath());
         addSourceToGroup(sf->GetFullPath());
       }
       }
     }
     }