Merge branch 'doc-add_test-cleanup' into release
ExpandListArguments: Optimize the parser

Optimize cmSystemTools::ExpandListArguments so as not to build a string
character-by-character. This avoids excess reallocations of the result
string.
cmGeneratorExpressionLexer: Use a switch statement to parse

Optimize cmGeneratorExpressionLexer::Tokenize to use a switch statement.
The many dereferences of the input pointer were expensive. Also remove
excess pointer arithmetic.
cmGeneratorExpression: Improve parsing in StripEmptyListElements

The char-by-char parsing causes lots of reallocations which shouldn't be
necessary. To improve this, fast-path strings without a semicolon,
reserve space in the result, and insert into the result in chunks.
Merge branch 'install-FILES-genex' into release
UseSWIG: Name extra generated files after module name (#10080)
cmTarget: Move SourceFileFlags to cmGeneratorTarget.
cmTarget: Find source files on request.

In a follow-up, the list of sources will become dependent on
the config, so check for existence in cmTarget::GetSourceFiles
instead of up-front with cmGlobalGenerator::CheckTargets().
cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.

The callers already skip non-targets, so unify the target search.

Change supporting functions to accept a container of targets instead
of strings where possible.
cmTarget: Extract a ComputeLinkImplementationLanguages method.
cmTarget: Re-arrange the ComputeLinkInterface method.

Arrange the logic so that the part which deals with libraries only is
at the top.  In a follow-up commit, this will be split into two methods.

Ensure that the explanatory CMP0022 comment is only present in one
location.
cmTarget: Extract a ComputeLinkInterfaceLibraries method.

When evaluating the SOURCES property, we will need to be able to access
the link libraries without accessing the link languages, as the languages
depend on the SOURCES.
cmTarget: Move ComputeLinkInterface to the internal class.

In a follow-up, this will use the OptionalLinkInterface in its
API. That class is in the cmTargetInternals class.
cmTarget: Avoid computing languages when computing transitive targets.

For the OLD CMP0022 behavior, we need to treat the implementation
as the interface when computing the interface libraries.  Make it
possible to do that without computing the link languages by adding
a new GetLinkImplementationLibraries method.  Extend the existing
GetLinkImplementation method to populate the languages if the
libraries have already been computed and cached.

Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries
instead of GetLinkInterface.  This is key, as it is a method called
by cmGeneratorExpressionEvaluator.

Change the cmGeneratorExpressionEvaluator to invoke
GetLinkImplementationLibraries instead of GetLinkImplementation.
cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility

This simplifies further refactoring.
cmTarget: Add GetTransitiveTargetClosure method.

Replace calls to GetLinkInformation with calls to a method to get only
the target closure, not the link languages etc.  The replaced calls
are used while evaluating generator expressions only.  This makes
transitive generator expression evaluation independent from
the languages of a target.  In a follow-up topic, it will be possible
to make the languages depend on generator expression evaluation, via
evaluation of the SOURCES and INTERFACE_SOURCES target properties.

Because the order of entries is not the same as the final link line,
the order of debug output is different in the RunCMake.CompatibleInterface
test, because the BOOL_PROP7 target property is evaluated first. Adjust
the test to account for that new order.
cmGeneratorTarget: Use a method to access the definition file.
cmGeneratorTarget: Classify sources on demand, not up front.

Implement a Visitor to hold the sequence of source file tests
for populating outputs.  Use VS 6 and 7 workaround from Brad
King for lack of partial template specialization and function
template specialization capabilities.

This will make it possible to use context dependent generator
expressions to determine the sources of a target.
Handle Mac OSX source flags for individual files lazily.

The actual list of files will become config dependent in a follow-up
commit.
find_dependency: Add namespacing for variables in the macro.

Avoid setting a variable called 'version' etc.