Browse Source

Unity: Clarify source comments on unity build transformation

Brad King 1 year ago
parent
commit
30829da506
2 changed files with 3 additions and 1 deletions
  1. 2 1
      Source/cmGlobalGenerator.cxx
  2. 1 0
      Source/cmLocalGenerator.cxx

+ 2 - 1
Source/cmGlobalGenerator.cxx

@@ -1892,7 +1892,8 @@ bool cmGlobalGenerator::AddAutomaticSources()
       }
     }
   }
-  // The above transformations may have changed the classification of sources.
+  // The above transformations may have changed the classification of sources,
+  // e.g., sources that go into unity builds become SourceKindUnityBatched.
   // Clear the source list and classification cache (KindedSources) of all
   // targets so that it will be recomputed correctly by the generators later
   // now that the above transformations are done for all targets.

+ 1 - 0
Source/cmLocalGenerator.cxx

@@ -3131,6 +3131,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target)
 
   for (size_t ci = 0; ci < configs.size(); ++ci) {
     // FIXME: Refactor collection of sources to not evaluate object libraries.
+    // Their final set of object files might be transformed by unity builds.
     std::vector<cmSourceFile*> sources;
     target->GetSourceFiles(sources, configs[ci]);
     for (cmSourceFile* sf : sources) {