diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2021-11-01 14:27:05 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2022-02-07 23:02:32 (GMT) |
commit | 42965799b4747ab1e0afa6546be13444f68c1987 (patch) | |
tree | 6149298a0fc9fd0f836cbe92b602d6eb863dc581 /Source/cmComputeLinkDepends.h | |
parent | 78dd7d5292cef930b3d435e6901cc3b10ee02513 (diff) | |
download | CMake-42965799b4747ab1e0afa6546be13444f68c1987.zip CMake-42965799b4747ab1e0afa6546be13444f68c1987.tar.gz CMake-42965799b4747ab1e0afa6546be13444f68c1987.tar.bz2 |
Genex: Add $<LINK_LIBRARY:...>
This generator expression offers the capability, for the link step, to
decorate libraries with prefix/suffix flags and/or adding any specific flag for each
library.
Fixes: #22812, #18751, #20078, #22703
Diffstat (limited to 'Source/cmComputeLinkDepends.h')
-rw-r--r-- | Source/cmComputeLinkDepends.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index 727c666..02bdf50 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -30,7 +30,8 @@ class cmComputeLinkDepends { public: cmComputeLinkDepends(cmGeneratorTarget const* target, - const std::string& config); + const std::string& config, + const std::string& linkLanguage); ~cmComputeLinkDepends(); cmComputeLinkDepends(const cmComputeLinkDepends&) = delete; @@ -51,6 +52,9 @@ public: bool IsSharedDep = false; bool IsFlag = false; bool IsObject = false; + // The following member is for the management of items specified + // through genex $<LINK_LIBRARY:...> + std::string Feature; }; using EntryVector = std::vector<LinkEntry>; @@ -68,12 +72,13 @@ private: cmMakefile* Makefile; cmGlobalGenerator const* GlobalGenerator; cmake* CMakeInstance; + std::string LinkLanguage; std::string Config; EntryVector FinalLinkEntries; - std::map<cmLinkItem, int>::iterator AllocateLinkEntry( + std::pair<std::map<cmLinkItem, int>::iterator, bool> AllocateLinkEntry( cmLinkItem const& item); - int AddLinkEntry(cmLinkItem const& item); + std::pair<int, bool> AddLinkEntry(cmLinkItem const& item); void AddLinkObject(cmLinkItem const& item); void AddVarLinkEntries(int depender_index, const char* value); void AddDirectLinkEntries(); @@ -131,7 +136,7 @@ private: void DisplayConstraintGraph(); // Ordering algorithm. - void OrderLinkEntires(); + void OrderLinkEntries(); std::vector<char> ComponentVisited; std::vector<int> ComponentOrder; |