diff options
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index d79c04f..3e5d764 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -219,14 +219,9 @@ bool cmAddLibraryCommand(std::vector<std::string> const& args, "\" is not a library.")); return false; } - if (aliasedTarget->IsImported() && - !aliasedTarget->IsImportedGloballyVisible()) { - status.SetError(cmStrCat("cannot create ALIAS target \"", libName, - "\" because target \"", aliasedName, - "\" is imported but not globally visible.")); - return false; - } - mf.AddAlias(libName, aliasedName); + mf.AddAlias(libName, aliasedName, + !aliasedTarget->IsImported() || + aliasedTarget->IsImportedGloballyVisible()); return true; } |