diff options
author | Brad King <brad.king@kitware.com> | 2018-10-29 16:02:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-29 16:02:18 (GMT) |
commit | 88477e0429f62bc4d8d252da460b9202f2f924be (patch) | |
tree | 1052304475d891d5d18cf1dac1730bef307cddd8 | |
parent | 9b5ebbd8602fbe206f560228db9bcec6ffd68c93 (diff) | |
parent | 3f5bfb425af391c1740ff7794f0283be3d0f7589 (diff) | |
download | CMake-88477e0429f62bc4d8d252da460b9202f2f924be.zip CMake-88477e0429f62bc4d8d252da460b9202f2f924be.tar.gz CMake-88477e0429f62bc4d8d252da460b9202f2f924be.tar.bz2 |
Merge branch 'backport-cuda-filter-device-link-libs' into release-3.12
Merge-request: !2536
-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 470f394..20bd537 100644 --- a/Source/cmLinkLineDeviceComputer.cxx +++ b/Source/cmLinkLineDeviceComputer.cxx @@ -68,15 +68,15 @@ std::string cmLinkLineDeviceComputer::ComputeLinkLibraries( } 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")) { - fout << "-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")) { + fout << this->ConvertToOutputFormat( + this->ConvertToLinkReference(item.Value)); } - fout << this->ConvertToOutputFormat( - this->ConvertToLinkReference(item.Value)); } else if (cmLinkItemValidForDevice(item.Value)) { fout << item.Value; } |