(self, sources: T.List['SourceOutputs'])
Split sources into generated and static sources.

        Sources can be:
        1. Pre-existing source files in the source tree (static)
        2. Pre-existing sources generated by configure_file in the build tree.
           (static as they are only regenerated if meson itself is regenerated)
        3. Sources files generated by another target or a Generator (generated)
Split sources into generated and static sources.
Split sources into generated and static sources .
def process_sourcelist(self, sources: T.List['SourceOutputs']) -> None:
        """Split sources into generated and static sources.

        Sources can be:
        1. Pre-existing source files in the source tree (static)
        2. Pre-existing sources generated by configure_file in the build tree.
           (static as they are only regenerated if meson itself is regenerated)
        3. Sources files generated by another target or a Generator (generated)
        """
        added_sources: T.Set[File] = set() # If the same source is defined multiple times, use it only once.
        for s in sources:
            if isinstance(s, File):
                if s not in added_sources:
                    self.sources.append(s)
                    added_sources.add(s)
            elif isinstance(s, (CustomTarget, CustomTargetIndex, GeneratedList)):
                self.generated.append(s)
def process_sourcelist ( self , sources : T . List [ 'SourceOutputs' ] ) -> None : added_sources : T . Set [ File ] = set ( ) # If the same source is defined multiple times, use it only once. for s in sources : if isinstance ( s , File ) : if s not in added_sources : self . sources . append ( s ) added_sources . add ( s ) elif isinstance ( s , ( CustomTarget , CustomTargetIndex , GeneratedList ) ) : self . generated . append ( s )