mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-30 02:59:22 -05:00
cmLinkItem: Convert to a "sum type" over a string and target pointer
Avoid exposing the item name implicitly as std::string. When the item is a target, avoid storing a second copy of its name. Most link item construction is paired with calls to `FindTargetToLink` to get the possible target pointer. Rename these methods to `ResolveLinkItem` and refactor them to construct the entire item.
This commit is contained in:
@@ -357,7 +357,7 @@ public:
|
||||
cmOptionalLinkImplementation& impl,
|
||||
const cmGeneratorTarget* head) const;
|
||||
|
||||
cmGeneratorTarget* FindTargetToLink(std::string const& name) const;
|
||||
cmLinkItem ResolveLinkItem(std::string const& name) const;
|
||||
|
||||
// Compute the set of languages compiled by the target. This is
|
||||
// computed every time it is called because the languages can change
|
||||
|
||||
Reference in New Issue
Block a user