summaryrefslogtreecommitdiffstats
path: root/Source/cmTargetLinkLibrariesCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-08-31 17:04:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-08-31 17:10:26 (GMT)
commita47a853376184031051ed744ed4718a69876002d (patch)
tree52373cfa5c1ac25da037b531233fc89564f7c2b4 /Source/cmTargetLinkLibrariesCommand.cxx
parent4f96641ba2e0b26523f962e2c18aa83a8b91c6aa (diff)
downloadCMake-a47a853376184031051ed744ed4718a69876002d.zip
CMake-a47a853376184031051ed744ed4718a69876002d.tar.gz
CMake-a47a853376184031051ed744ed4718a69876002d.tar.bz2
target_link_libraries: Allow linking to UNKNOWN IMPORTED GLOBAL libs
This combination was accidentally rejected. Allow it and add a test. Fixes: #17245
Diffstat (limited to 'Source/cmTargetLinkLibrariesCommand.cxx')
-rw-r--r--Source/cmTargetLinkLibrariesCommand.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmTargetLinkLibrariesCommand.cxx b/Source/cmTargetLinkLibrariesCommand.cxx
index bfae53c..d146640 100644
--- a/Source/cmTargetLinkLibrariesCommand.cxx
+++ b/Source/cmTargetLinkLibrariesCommand.cxx
@@ -366,6 +366,7 @@ bool cmTargetLinkLibrariesCommand::HandleLibrary(const std::string& lib,
if (tgt && (tgt->GetType() != cmStateEnums::STATIC_LIBRARY) &&
(tgt->GetType() != cmStateEnums::SHARED_LIBRARY) &&
+ (tgt->GetType() != cmStateEnums::UNKNOWN_LIBRARY) &&
(tgt->GetType() != cmStateEnums::INTERFACE_LIBRARY) &&
!tgt->IsExecutableWithExports()) {
std::ostringstream e;