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 capability.

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.
Merge topic 'target-SOURCES-refactor' into next

d1c2adcb Handle Mac OSX source flags for individual files lazily.
7419059b cmGeneratorTarget: Classify sources on demand, not up front.
359f3994 cmGeneratorTarget: Use a method to access the definition file.
b5ec46f2 cmTarget: Add GetTransitiveTargetClosure method.
dad68373 cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility
922b6ceb cmTarget: Avoid computing languages when computing transitive targets.
8050357b cmTarget: Move ComputeLinkInterface to the internal class.
4bd81b8b cmTarget: Extract a ComputeLinkInterfaceLibraries method.
17959bfc cmTarget: Re-arrange the ComputeLinkInterface method.
3e6c6502 cmTarget: Extract a ComputeLinkImplementationLanguages method.
bd8cbbb8 cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.
f48987a8 cmTarget: Find source files on request.
Fix whitespace.
Merge topic 'target-SOURCES-refactor' into next

58aa2273 Fix whitespace.
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.