[cmake-developers] Bugfix: Default behavior of CUDA_USE_STATIC_CUDA_RUNTIME

Sorley, Stephen L. Stephen.Sorley at jhuapl.edu
Thu Aug 11 16:10:45 EDT 2016


The previous fix uncovered another bug from commit 7229ae7.  That commit dropped librt from the link line when using static linking with CUDA 7.0 or newer on Linux.  However, librt is still required on the link line in newer CUDA versions, I get linker errors without it.

I've attached a second patch to fix this extra bug.

Thanks!
Stephen Sorley

From: Sorley, Stephen L.
Sent: Thursday, August 11, 2016 3:37 PM
To: cmake-developers at cmake.org
Subject: Bugfix: Default behavior of CUDA_USE_STATIC_CUDA_RUNTIME

Recent changes to FindCUDA.cmake (commit 7229ae7) broke the documented behavior of the CUDA_USE_STATIC_CUDA_RUNTIME option.  Per the documentation, this option should be enabled by default if libcudart_static is present in the selected version of CUDA, and silently disabled if it's not.  After commit 7229ae7, the option is disabled by default instead.

I've attached a small patch (based on master) that fixes the problem.

Thanks!
Stephen Sorley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160811/254bee6c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-for-missing-librt-on-Linux-when-using-static-cud.patch
Type: application/octet-stream
Size: 1439 bytes
Desc: 0001-Fix-for-missing-librt-on-Linux-when-using-static-cud.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160811/254bee6c/attachment.obj>


More information about the cmake-developers mailing list