diff options
author | Brad King <brad.king@kitware.com> | 2018-10-29 16:02:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-10-29 16:02:46 (GMT) |
commit | f366228c80c65e9616d5b545d733a7d72a6be928 (patch) | |
tree | 32f9ad57a62ac077459ff6be6a0386689b7f17d1 | |
parent | 87d38b4038d59bbee80104e26105dc06f5c5f70c (diff) | |
parent | 3c31ec7a0a34b7fbbf2ceae9c6bc27f9b536c1b8 (diff) | |
download | CMake-f366228c80c65e9616d5b545d733a7d72a6be928.zip CMake-f366228c80c65e9616d5b545d733a7d72a6be928.tar.gz CMake-f366228c80c65e9616d5b545d733a7d72a6be928.tar.bz2 |
Merge branch 'cuda-filter-device-link-libs' into release-3.13
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 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; } |