mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 14:48:19 -05:00
Merge topic 'add_custom_command-target-alias'
3b07ec631d add_custom_command: Allow adding build event via ALIAS target
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9201
This commit is contained in:
@@ -1144,9 +1144,15 @@ cmTarget* cmMakefile::GetCustomCommandTarget(
|
||||
const std::string& target, cmObjectLibraryCommands objLibCommands,
|
||||
const cmListFileBacktrace& lfbt) const
|
||||
{
|
||||
// Find the target to which to add the custom command.
|
||||
auto ti = this->Targets.find(target);
|
||||
auto realTarget = target;
|
||||
|
||||
auto ai = this->AliasTargets.find(target);
|
||||
if (ai != this->AliasTargets.end()) {
|
||||
realTarget = ai->second;
|
||||
}
|
||||
|
||||
// Find the target to which to add the custom command.
|
||||
auto ti = this->Targets.find(realTarget);
|
||||
if (ti == this->Targets.end()) {
|
||||
MessageType messageType = MessageType::AUTHOR_WARNING;
|
||||
bool issueMessage = false;
|
||||
|
||||
Reference in New Issue
Block a user