summaryrefslogtreecommitdiffstats
path: root/Source/cmExportBuildFileGenerator.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/cmExportBuildFileGenerator.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/cmExportBuildFileGenerator.cxx')
-rw-r--r--Source/cmExportBuildFileGenerator.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmExportBuildFileGenerator.cxx b/Source/cmExportBuildFileGenerator.cxx
index a276d01..f0ae47b 100644
--- a/Source/cmExportBuildFileGenerator.cxx
+++ b/Source/cmExportBuildFileGenerator.cxx
@@ -159,7 +159,9 @@ cmStateEnums::TargetType cmExportBuildFileGenerator::GetExportTargetType(
{
cmStateEnums::TargetType targetType = target->GetType();
// An object library exports as an interface library if we cannot
- // tell clients where to find the objects.
+ // tell clients where to find the objects. This is sufficient
+ // to support transitive usage requirements on other targets that
+ // use the object library.
if (targetType == cmStateEnums::OBJECT_LIBRARY &&
!this->LG->GetGlobalGenerator()->HasKnownObjectFileLocation(nullptr)) {
targetType = cmStateEnums::INTERFACE_LIBRARY;