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:
Brad King
2018-09-06 13:10:55 -04:00
parent f782759ed0
commit fc7e4d1ed8
10 changed files with 145 additions and 66 deletions

View File

@@ -352,6 +352,7 @@ CMAKE_CXX_SOURCES="\
cmInstallTargetsCommand \
cmInstalledFile \
cmLinkDirectoriesCommand \
cmLinkItem \
cmLinkLineComputer \
cmListCommand \
cmListFileCache \