summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-11-08 12:31:25 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-11-08 12:54:49 (GMT)
commit4ce9742ae33678d8fce189d172c2fffb1a43061c (patch)
treec6c5430ad37f438cb0225d620b8f63e4adcd15e5 /Source/cmGlobalGenerator.cxx
parent39e830a98e81929ce95694f2f81d92ffd3f14d5b (diff)
downloadCMake-4ce9742ae33678d8fce189d172c2fffb1a43061c.zip
CMake-4ce9742ae33678d8fce189d172c2fffb1a43061c.tar.gz
CMake-4ce9742ae33678d8fce189d172c2fffb1a43061c.tar.bz2
Alias: Fix access at generate-time (#15832)
Commit c389f8bb (cmLocalGenerator: Port Find method away from GetGeneratorTarget, 2015-10-25) ported the implementation of FindGeneratorTargetToUse away from the FindTargetToUse method, but neglected to handle alias targets. The latter method has a parameter to determine whether to include alias targets in the search, but as that is only needed at configure time, this generate-time equivalent does not need the condition.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 3d2db42..2126c71 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -2274,6 +2274,12 @@ cmGlobalGenerator::FindTarget(const std::string& name,
cmGeneratorTarget*
cmGlobalGenerator::FindGeneratorTarget(const std::string& name) const
{
+ std::map<std::string, std::string>::const_iterator ai =
+ this->AliasTargets.find(name);
+ if (ai != this->AliasTargets.end())
+ {
+ return this->FindGeneratorTargetImpl(ai->second);
+ }
if (cmGeneratorTarget* tgt = this->FindGeneratorTargetImpl(name))
{
return tgt;