Brad King bc30f8b5e6 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
Refactoring in commit v3.5.0-rc1~272^2~11 (cmTarget: Implement ALIAS in
terms of name mapping, 2015-10-25) accidentally introduced logic that
assumes ALIAS targets always reference targets in their own directory.
Fix this and add a test case.

The configure-step fix is that `cmMakefile::FindTarget` should not consider
aliases.  The purpose of this method is just to look up targets local to
a directory.  Since ALIAS and normal targets share a namespace we know a
locally defined target will never collide with an ALIAS target anyway.
The method has 3 call sites, and this change is safe for all of them:

* `cmInstallCommand::HandleTargetsMode`: Rejects aliases before the call.
* `cmFLTKWrapUICommand::FinalPass`: Should never have considered aliases.
* `cmMakefile::FindTargetToUse`: Falls back to a global lookup anyway.

The generate-step fix is that `cmLocalGenerator::FindGeneratorTarget`
should not consider aliases.  This method is the generate-step
equivalent to the above.  The method has 2 call sites, and this change
is safe for both of them:

* `cmInstallTargetGenerator::Compute`: Never uses an alias target name.
* `cmLocalGenerator::FindGeneratorTargetToUse`: Falls back to global lookup.

Reported-by: Matteo Settenvini <matteo@member.fsf.org>
2016-04-01 15:44:16 -04:00
..
2015-12-18 10:02:07 -05:00
2015-12-18 10:02:07 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-07-23 15:33:10 -04:00
2016-03-24 09:56:42 -04:00
2014-03-08 13:05:39 -05:00
2015-12-18 10:02:07 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-10-15 23:16:44 +02:00
2014-10-15 23:16:44 +02:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-11-25 10:33:26 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-11 15:03:50 +01:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-02-20 21:36:58 +01:00
2014-03-08 13:05:35 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-06-07 09:32:24 +02:00
2015-10-28 08:48:08 -04:00
2015-05-19 22:36:51 +02:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2014-03-08 13:05:39 -05:00
2015-04-13 11:44:15 -04:00
2015-12-18 10:02:07 -05:00
2015-10-26 22:30:13 +01:00