diff options
Diffstat (limited to 'Source/cmAddLibraryCommand.cxx')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 1278232..7792235 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -228,6 +228,14 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args, this->SetError(e.str()); return false; } + if (aliasedTarget->IsImported() && + !aliasedTarget->IsImportedGloballyVisible()) { + std::ostringstream e; + e << "cannot create ALIAS target \"" << libName << "\" because target \"" + << aliasedName << "\" is imported but not globally visible."; + this->SetError(e.str()); + return false; + } this->Makefile->AddAlias(libName, aliasedName); return true; } |