diff options
author | Brad King <brad.king@kitware.com> | 2021-12-15 15:50:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-12-15 17:29:44 (GMT) |
commit | a84a62e0a748c05f1779c4cd1e022df7d27e0db8 (patch) | |
tree | 4b8e6133eb43b6ede88e40b466f18c115f13f9c7 /Source/cmTarget.cxx | |
parent | 029c8f50652415baf4aa3dd96c9a8dc9626ae4ec (diff) | |
download | CMake-a84a62e0a748c05f1779c4cd1e022df7d27e0db8.zip CMake-a84a62e0a748c05f1779c4cd1e022df7d27e0db8.tar.gz CMake-a84a62e0a748c05f1779c4cd1e022df7d27e0db8.tar.bz2 |
cmTarget: Record backtraces for INTERFACE_LINK_LIBRARIES
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ebf5bd0..38361cc 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -200,6 +200,7 @@ public: std::vector<BT<std::string>> LinkOptionsEntries; std::vector<BT<std::string>> LinkDirectoriesEntries; std::vector<BT<std::string>> LinkImplementationPropertyEntries; + std::vector<BT<std::string>> LinkInterfacePropertyEntries; std::vector<BT<std::string>> HeaderSetsEntries; std::vector<BT<std::string>> InterfaceHeaderSetsEntries; std::vector<std::pair<cmTarget::TLLSignature, cmListFileContext>> @@ -1114,6 +1115,11 @@ cmBTStringRange cmTarget::GetLinkImplementationEntries() const return cmMakeRange(this->impl->LinkImplementationPropertyEntries); } +cmBTStringRange cmTarget::GetLinkInterfaceEntries() const +{ + return cmMakeRange(this->impl->LinkInterfacePropertyEntries); +} + cmBTStringRange cmTarget::GetHeaderSetsEntries() const { return cmMakeRange(this->impl->HeaderSetsEntries); @@ -1157,6 +1163,7 @@ MAKE_PROP(HEADER_DIRS); MAKE_PROP(HEADER_SET); MAKE_PROP(HEADER_SETS); MAKE_PROP(INTERFACE_HEADER_SETS); +MAKE_PROP(INTERFACE_LINK_LIBRARIES); #undef MAKE_PROP } @@ -1282,6 +1289,12 @@ void cmTarget::StoreProperty(const std::string& prop, ValueType value) cmListFileBacktrace lfbt = this->impl->Makefile->GetBacktrace(); this->impl->LinkImplementationPropertyEntries.emplace_back(value, lfbt); } + } else if (prop == propINTERFACE_LINK_LIBRARIES) { + this->impl->LinkInterfacePropertyEntries.clear(); + if (value) { + cmListFileBacktrace lfbt = this->impl->Makefile->GetBacktrace(); + this->impl->LinkInterfacePropertyEntries.emplace_back(value, lfbt); + } } else if (prop == propSOURCES) { this->impl->SourceEntries.clear(); if (value) { @@ -1535,6 +1548,11 @@ void cmTarget::AppendProperty(const std::string& prop, cmListFileBacktrace lfbt = this->impl->Makefile->GetBacktrace(); this->impl->LinkImplementationPropertyEntries.emplace_back(value, lfbt); } + } else if (prop == propINTERFACE_LINK_LIBRARIES) { + if (!value.empty()) { + cmListFileBacktrace lfbt = this->impl->Makefile->GetBacktrace(); + this->impl->LinkInterfacePropertyEntries.emplace_back(value, lfbt); + } } else if (prop == "SOURCES") { cmListFileBacktrace lfbt = this->impl->Makefile->GetBacktrace(); this->impl->SourceEntries.emplace_back(value, lfbt); @@ -1844,6 +1862,7 @@ cmValue cmTarget::GetProperty(const std::string& prop) const propHEADER_SET, propHEADER_SETS, propINTERFACE_HEADER_SETS, + propINTERFACE_LINK_LIBRARIES, }; if (specialProps.count(prop)) { if (prop == propC_STANDARD || prop == propCXX_STANDARD || @@ -1864,6 +1883,15 @@ cmValue cmTarget::GetProperty(const std::string& prop) const output = cmJoin(this->impl->LinkImplementationPropertyEntries, ";"); return cmValue(output); } + if (prop == propINTERFACE_LINK_LIBRARIES) { + if (this->impl->LinkInterfacePropertyEntries.empty()) { + return nullptr; + } + + static std::string output; + output = cmJoin(this->impl->LinkInterfacePropertyEntries, ";"); + return cmValue(output); + } // the type property returns what type the target is if (prop == propTYPE) { return cmValue(cmState::GetTargetTypeName(this->GetType())); |