diff options
author | Deniz Bahadir <dbahadir@benocs.com> | 2017-11-24 16:20:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-01 14:24:24 (GMT) |
commit | dfb6e84082884f908ffad4594d2712d9edfd2cc0 (patch) | |
tree | d553ea3a982588c523bc34115f19cbeebe34a74c /Source/cmTarget.cxx | |
parent | 51249e69eaab33fe43805b9fe2262b4ddab01b56 (diff) | |
download | CMake-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/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 734ac93..bb21022 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -114,15 +114,12 @@ const char* cmTargetPropertyComputer::GetSources<cmTarget>( } if (!noMessage) { e << "Target \"" << tgt->GetName() - << "\" contains " - "$<TARGET_OBJECTS> generator expression in its sources " - "list. " - "This content was not previously part of the SOURCES " - "property " - "when that property was read at configure time. Code " - "reading " - "that property needs to be adapted to ignore the generator " - "expression using the string(GENEX_STRIP) command."; + << "\" contains $<TARGET_OBJECTS> generator expression in its " + "sources list. This content was not previously part of the " + "SOURCES property when that property was read at configure " + "time. Code reading that property needs to be adapted to " + "ignore the generator expression using the string(GENEX_STRIP) " + "command."; messenger->IssueMessage(messageType, e.str(), context); } if (addContent) { @@ -742,7 +739,8 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib, } if (cmGeneratorExpression::Find(lib) != std::string::npos || - (tgt && tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) || + (tgt && (tgt->GetType() == cmStateEnums::INTERFACE_LIBRARY || + tgt->GetType() == cmStateEnums::OBJECT_LIBRARY)) || (this->Name == lib)) { return; } |