From 30829da50616c18e88e69e8fd6b4508ce28429c3 Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 2 Feb 2024 07:59:21 -0500 Subject: Unity: Clarify source comments on unity build transformation --- Source/cmGlobalGenerator.cxx | 3 ++- Source/cmLocalGenerator.cxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 493d32d..d44863d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/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. diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 7337ea2..3e98341 100644 --- a/Source/cmLocalGenerator.cxx +++ b/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 sources; target->GetSourceFiles(sources, configs[ci]); for (cmSourceFile* sf : sources) { -- cgit v0.12