• Stephen Kelly's avatar
    cmTarget: Add all sources traced from custom commands at once. · 4f1c71fd
    Stephen Kelly authored
    The AddSource method accepts one file and tries to avoiding adding
    it to the sources-list of the target if it already exists.  This
    involves creating many cmSourceFileLocation objects for matching
    on existing files, which is an expensive operation.
    
    Avoid the searching algorithm by appending the new sources as one
    group.  Generate-time processing of source files will ensure
    uniqueness.
    
    Add a new AddTracedSources for this purpose.  The existing
    AddSources method must process the input for policy CMP0049, but
    as these source filenames come from cmSourceFile::GetFullPath(),
    we can forego that extra processing.
    4f1c71fd
cmGeneratorTarget.cxx 35.3 KB