Fix scope of transitive target name lookups

In cmTarget, cmGeneratorTarget, and cmGeneratorExpressionEvaluator, fix
target name lookups to occur in the cmMakefile context of the target
that referenced the name, not the current 'head' target.  The context
matters for imported targets because they are directory-scoped instead
of globally unique.  We already do this in cmComputeLinkDepends and
cmComputeTargetDepends.

Extend the InterfaceLibrary test with an example covering this behavior.
This commit is contained in:
Brad King
2014-06-16 10:10:18 -04:00
parent 069d60fe03
commit a272344228
7 changed files with 36 additions and 18 deletions

View File

@@ -15,7 +15,9 @@
#error Expected IFACE_HEADER_BUILDDIR
#endif
extern int sub();
int main(int,char**)
{
return 0;
return sub();
}