[Cmake-commits] CMake branch, next, updated. v3.4.0-rc3-1257-g680f645
Stephen Kelly
steveire at gmail.com
Sun Nov 8 07:37:38 EST 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 680f645f5d26b05b687965dd1baac38b0551ac9f (commit)
via 87605acb1c89dfe65795fd99b6acb2b9553f74af (commit)
from 3b4c612aac81b5a8ec5e53fcd847eb8a03e3ba59 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=680f645f5d26b05b687965dd1baac38b0551ac9f
commit 680f645f5d26b05b687965dd1baac38b0551ac9f
Merge: 3b4c612 87605ac
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Nov 8 07:37:37 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Nov 8 07:37:37 2015 -0500
Merge topic 'fix-alias-target-access' into next
87605acb Alias: Fix access at generate-time (#15832)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=87605acb1c89dfe65795fd99b6acb2b9553f74af
commit 87605acb1c89dfe65795fd99b6acb2b9553f74af
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Nov 8 13:31:25 2015 +0100
Commit: Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Nov 8 13:36:21 2015 +0100
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.
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;
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt
index c50b4e6..e1d8966 100644
--- a/Tests/AliasTarget/CMakeLists.txt
+++ b/Tests/AliasTarget/CMakeLists.txt
@@ -37,7 +37,9 @@ target_include_directories(bat PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
add_executable(targetgenerator targetgenerator.cpp)
add_executable(Generator::Target ALIAS targetgenerator)
-add_custom_target(usealias Generator::Target)
+add_subdirectory(subdir)
+
+add_custom_target(usealias Generator::Target $<TARGET_FILE:Sub::tgt>)
add_dependencies(bat usealias)
if (NOT TARGET Another::Alias)
-----------------------------------------------------------------------
Summary of changes:
Source/cmGlobalGenerator.cxx | 6 ++++++
Tests/AliasTarget/CMakeLists.txt | 4 +++-
2 files changed, 9 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list