summaryrefslogtreecommitdiffstats
path: root/Source/cmAddExecutableCommand.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmAddExecutableCommand.cxx')
-rw-r--r--Source/cmAddExecutableCommand.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmAddExecutableCommand.cxx b/Source/cmAddExecutableCommand.cxx
index e738bc4..9dd8a19 100644
--- a/Source/cmAddExecutableCommand.cxx
+++ b/Source/cmAddExecutableCommand.cxx
@@ -117,14 +117,9 @@ bool cmAddExecutableCommand(std::vector<std::string> const& args,
"\" is not an executable."));
return false;
}
- if (aliasedTarget->IsImported() &&
- !aliasedTarget->IsImportedGloballyVisible()) {
- status.SetError(cmStrCat("cannot create ALIAS target \"", exename,
- "\" because target \"", aliasedName,
- "\" is imported but not globally visible."));
- return false;
- }
- mf.AddAlias(exename, aliasedName);
+ mf.AddAlias(exename, aliasedName,
+ !aliasedTarget->IsImported() ||
+ aliasedTarget->IsImportedGloballyVisible());
return true;
}