cmComputeLinkInformation: Improve type safety of item IsPath member

Use an enum to avoid implicit conversions to bool.
This commit is contained in:
Brad King
2021-05-29 09:21:20 -04:00
parent 83ad066ed1
commit 8a4ca110e4
7 changed files with 35 additions and 24 deletions

View File

@@ -111,7 +111,7 @@ void cmLinkLineDeviceComputer::ComputeLinkLibraries(
}
BT<std::string> linkLib;
if (item.IsPath) {
if (item.IsPath == cmComputeLinkInformation::ItemIsPath::Yes) {
// nvcc understands absolute paths to libraries ending in '.a' or '.lib'.
// These should be passed to nvlink. Other extensions need to be left
// out because nvlink may not understand or need them. Even though it