diff options
author | Brad King <brad.king@kitware.com> | 2019-04-01 14:31:00 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-01 14:31:11 (GMT) |
commit | 922480e6f14fa5b248475fb58ab07c3b2ef5befa (patch) | |
tree | 55bac80dcbb435257450ab51217066b52577f4bb /Source | |
parent | c5eb01d4d412610673c85ca1bf8b9d15c168ab5e (diff) | |
parent | 6d5872a3969b75686ee7d67449581ab723559bf5 (diff) | |
download | CMake-922480e6f14fa5b248475fb58ab07c3b2ef5befa.zip CMake-922480e6f14fa5b248475fb58ab07c3b2ef5befa.tar.gz CMake-922480e6f14fa5b248475fb58ab07c3b2ef5befa.tar.bz2 |
Merge topic 'allow_aliasing_unkown_targets'
6d5872a396 add_library: Now support aliasing unknown import targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3148
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmAddLibraryCommand.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmAddLibraryCommand.cxx b/Source/cmAddLibraryCommand.cxx index 5149333..adf4464 100644 --- a/Source/cmAddLibraryCommand.cxx +++ b/Source/cmAddLibraryCommand.cxx @@ -222,7 +222,9 @@ bool cmAddLibraryCommand::InitialPass(std::vector<std::string> const& args, aliasedType != cmStateEnums::STATIC_LIBRARY && aliasedType != cmStateEnums::MODULE_LIBRARY && aliasedType != cmStateEnums::OBJECT_LIBRARY && - aliasedType != cmStateEnums::INTERFACE_LIBRARY) { + aliasedType != cmStateEnums::INTERFACE_LIBRARY && + !(aliasedType == cmStateEnums::UNKNOWN_LIBRARY && + aliasedTarget->IsImported())) { std::ostringstream e; e << "cannot create ALIAS target \"" << libName << "\" because target \"" << aliasedName << "\" is not a library."; |