MCPcopy Create free account
hub / github.com/Kitware/CMake / cmLinkItemValidForDevice

Function cmLinkItemValidForDevice

Source/cmLinkLineDeviceComputer.cxx:36–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34cmLinkLineDeviceComputer::~cmLinkLineDeviceComputer() = default;
35
36static bool cmLinkItemValidForDevice(std::string const& item)
37{
38 // Valid items are:
39 // * Non-flags (does not start in '-')
40 // * Specific flags --library, --library-path, -l, -L
41 // For example:
42 // * 'cublas_device' => pass-along
43 // * '--library pthread' => pass-along
44 // * '-lpthread' => pass-along
45 // * '-pthread' => drop
46 // * '-a' => drop
47 // * '-framework Name' (as one string) => drop
48 return (!cmHasPrefix(item, '-') || //
49 cmHasLiteralPrefix(item, "-l") || //
50 cmHasLiteralPrefix(item, "-L") || //
51 cmHasLiteralPrefix(item, "--library"));
52}
53
54bool cmLinkLineDeviceComputer::ComputeRequiresDeviceLinking(
55 cmComputeLinkInformation& cli)

Callers 1

ComputeLinkLibrariesMethod · 0.85

Calls 2

cmHasPrefixFunction · 0.85
cmHasLiteralPrefixFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…