summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-06-29 19:57:16 (GMT)
committerBrad King <brad.king@kitware.com>2021-06-29 20:52:12 (GMT)
commite27a76f1311ab4ad1be07df018ac748d4b725cea (patch)
treed52fc751827893cd9468f86460d2dc8994c94b5d /Source/cmGeneratorTarget.h
parentfb02657b6a4f66cfb1b1673c170136f07945eda2 (diff)
downloadCMake-e27a76f1311ab4ad1be07df018ac748d4b725cea.zip
CMake-e27a76f1311ab4ad1be07df018ac748d4b725cea.tar.gz
CMake-e27a76f1311ab4ad1be07df018ac748d4b725cea.tar.bz2
target_link_libraries: Restore transitive out-of-dir linking
Refactoring in commit 7f506b95a7 (cmGeneratorTarget: Refactor link item lookup, 2021-05-26, v3.21.0-rc1~103^2~4) accidentally dropped the persistent lookup scope tracking across multiple items that was added by commit f0e67da061 (target_link_libraries: Fix out-of-dir linking of a list of targets, 2020-01-14, v3.17.0-rc1~149^2). This broke a transitive out-of-dir linking case not covered by our test suite. Restore the scope tracking and add a test case. Fixes: #22363
Diffstat (limited to 'Source/cmGeneratorTarget.h')
-rw-r--r--Source/cmGeneratorTarget.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h
index ed66fb1..6d2aa85 100644
--- a/Source/cmGeneratorTarget.h
+++ b/Source/cmGeneratorTarget.h
@@ -1042,8 +1042,13 @@ private:
bool& hadHeadSensitiveCondition,
bool& hadContextSensitiveCondition,
bool& hadLinkLanguageSensitiveCondition) const;
+ struct LookupLinkItemScope
+ {
+ cmLocalGenerator const* LG;
+ };
cm::optional<cmLinkItem> LookupLinkItem(std::string const& n,
- cmListFileBacktrace const& bt) const;
+ cmListFileBacktrace const& bt,
+ LookupLinkItemScope* scope) const;
std::vector<BT<std::string>> GetSourceFilePaths(
std::string const& config) const;