diff options
author | Brad King <brad.king@kitware.com> | 2018-10-30 15:02:49 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-10-30 15:03:03 (GMT) |
commit | 1d4b1a5853209be077d36af090ad7a32361a8923 (patch) | |
tree | 12816104861982f6413ef56b4cdea576dfe4d80b /Source | |
parent | 87dfd53b276bff00e5e018b29043d05cf503018e (diff) | |
parent | e8cc8d22d844a3ffc261b3ca79bb0ce5dc8c6dd6 (diff) | |
download | CMake-1d4b1a5853209be077d36af090ad7a32361a8923.zip CMake-1d4b1a5853209be077d36af090ad7a32361a8923.tar.gz CMake-1d4b1a5853209be077d36af090ad7a32361a8923.tar.bz2 |
Merge topic 'cuda_device_linking_drop_dynamic_libs'
e8cc8d22d8 Merge branch 'backport-cuda-filter-device-link-libs'
3f5bfb425a CUDA: Filter out non-static libraries during device linking
3c31ec7a0a CUDA: Filter out non-static libraries during device linking
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Merge-request: !2536
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLinkLineDeviceComputer.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/cmLinkLineDeviceComputer.cxx b/Source/cmLinkLineDeviceComputer.cxx index 025c6e4..a93ec12 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -77,15 +77,15 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries( std::string out; if (item.IsPath) { - // nvcc understands absolute paths to libraries ending in '.a' should - // be passed to nvlink. Other extensions like '.so' or '.dylib' are - // rejected by the nvcc front-end even though nvlink knows to ignore - // them. Bypass the front-end via '-Xnvlink'. - if (!cmHasLiteralSuffix(item.Value, ".a")) { - out += "-Xnvlink "; + // 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 + // can tolerate '.so' or '.dylib' it cannot tolerate '.so.1'. + if (cmHasLiteralSuffix(item.Value, ".a") || + cmHasLiteralSuffix(item.Value, ".lib")) { + out += this->ConvertToOutputFormat( + this->ConvertToLinkReference(item.Value)); } - out += - this->ConvertToOutputFormat(this->ConvertToLinkReference(item.Value)); } else if (cmLinkItemValidForDevice(item.Value)) { out += item.Value; } |