summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeTargetDepends.cxx
diff options
context:
space:
mode:
authorDeniz Bahadir <dbahadir@benocs.com>2017-11-24 16:20:18 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-01 14:24:24 (GMT)
commitdfb6e84082884f908ffad4594d2712d9edfd2cc0 (patch)
treed553ea3a982588c523bc34115f19cbeebe34a74c /Source/cmComputeTargetDepends.cxx
parent51249e69eaab33fe43805b9fe2262b4ddab01b56 (diff)
downloadCMake-dfb6e84082884f908ffad4594d2712d9edfd2cc0.zip
CMake-dfb6e84082884f908ffad4594d2712d9edfd2cc0.tar.gz
CMake-dfb6e84082884f908ffad4594d2712d9edfd2cc0.tar.bz2
objlib: Allow other libraries to link to `OBJECT` libraries.
Note: This only allows `OBJECT` libraries to be on the right-hand side of `target_link_libraries` but still does not link its object-files to the target on the left-hand side. Issue: #14778
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r--Source/cmComputeTargetDepends.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx
index 18767a3..efdd3a5 100644
--- a/Source/cmComputeTargetDepends.cxx
+++ b/Source/cmComputeTargetDepends.cxx
@@ -211,11 +211,11 @@ void cmComputeTargetDepends::CollectTargetDepends(int depender_index)
if (depender->GetType() != cmStateEnums::EXECUTABLE &&
depender->GetType() != cmStateEnums::STATIC_LIBRARY &&
depender->GetType() != cmStateEnums::SHARED_LIBRARY &&
- depender->GetType() != cmStateEnums::MODULE_LIBRARY) {
+ depender->GetType() != cmStateEnums::MODULE_LIBRARY &&
+ depender->GetType() != cmStateEnums::OBJECT_LIBRARY) {
this->GlobalGenerator->GetCMakeInstance()->IssueMessage(
cmake::FATAL_ERROR,
- "Only executables and non-OBJECT libraries may "
- "reference target objects.",
+ "Only executables and libraries may reference target objects.",
depender->GetBacktrace());
return;
}