cmTarget: Extract a ProcessSourceItemCMP0049 method.

Avoid calling AddSource for each src filename.  That involves
checking each entry for uniqueness and creating a separate
generator expression for each one.

Instead, add a single entry for the list of sources.  The source
files are passed through a uniqueness filter at generate-time, so
duplicates don't matter so much.
Add missing source creation.
cmTarget: Cache the cmSourceFiles in GetSourceFiles.
cmGeneratorTarget: Trace cmSourceFile objects instead of strings.

This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17).  The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
cmTarget: Make GetSourceFiles string overload private.

Consumers should use the cmSourceFile overload, which is now
always the case.
Merge topic 'optimize-source-file-processing' into next

8d952be5 cmTarget: Make GetSourceFiles string overload private.
9ed2ac6d cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
a5cf4623 cmTarget: Cache the cmSourceFiles in GetSourceFiles.
69d0ba7f Add missing source creation.
3be89def cmTarget: Extract a ProcessSourceItemCMP0049 method.
cmTarget: Extract a ProcessSourceItemCMP0049 method.

Avoid calling AddSource for each src filename.  That involves
checking each entry for uniqueness and creating a separate
generator expression for each one.

Instead, add a single entry for the list of sources.  The source
files are passed through a uniqueness filter at generate-time, so
duplicates don't matter so much.
cmTarget: Cache the cmSourceFiles in GetSourceFiles.
cmGeneratorTarget: Trace cmSourceFile objects instead of strings.

This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17).  The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
cmTarget: Make GetSourceFiles string overload private.

Consumers should use the cmSourceFile overload, which is now
always the case.
Merge topic 'optimize-source-file-processing' into next

ed829b8a cmTarget: Make GetSourceFiles string overload private.
5e7a1319 cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
a01a3e3b cmTarget: Cache the cmSourceFiles in GetSourceFiles.
2dc4de36 cmTarget: Extract a ProcessSourceItemCMP0049 method.
Fix tracing source file handling.
Merge topic 'optimize-source-file-processing' into next

157046a0 Fix tracing source file handling.
Ninja: Query custom commands once per target, not once per file.

Computing the source files is now more expensive, so the Ninja
generator became very slow with a large number of files.
cmTarget: Extract a ProcessSourceItemCMP0049 method.

Avoid calling AddSource for each src filename.  That involves
checking each entry for uniqueness and creating a separate
generator expression for each one.

Instead, add a single entry for the list of sources.  The source
files are passed through a uniqueness filter at generate-time, so
duplicates don't matter so much.
cmTarget: Cache the cmSourceFiles in GetSourceFiles.

Avoid calling GetSourceFiles with the same result container multiple
times when tracing target dependencies.  The result from the previous
configuration is cached and used later otherwise.
cmGeneratorTarget: Trace cmSourceFile objects instead of strings.

This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17).  The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
cmTarget: Make GetSourceFiles string overload private.

Consumers should use the cmSourceFile overload, which is now
always the case.
Merge topic 'optimize-source-file-processing' into next

9bc502b4 cmTarget: Make GetSourceFiles string overload private.
6049606c cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
fa733831 cmTarget: Cache the cmSourceFiles in GetSourceFiles.
d6bf82cf cmTarget: Extract a ProcessSourceItemCMP0049 method.
19b7c22d Ninja: Query custom commands once per target, not once per file.