File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,19 @@ if(WIN32)
4747 link_directories (Boost_LIBRARRY_DIR_RELEASE)
4848endif (WIN32 )
4949
50+ if (BUILD_SHARED_LIBS )
51+ message (STATUS "BUILD_SHARED_LIBS ON" )
52+ # Need to declare CUDA_USE_STATIC_CUDA_RUNTIME as an option to ensure that it is not overwritten in FindCUDA.
53+ option (CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" OFF )
54+ set (CUDA_USE_STATIC_CUDA_RUNTIME OFF )
55+ # Workaround to force deactivation of cuda static runtime for cmake < 3.10
56+ set (CUDA_cudart_static_LIBRARY 0)
57+ else ()
58+ message (STATUS "BUILD_SHARED_LIBS OFF" )
59+ option (CUDA_USE_STATIC_CUDA_RUNTIME "Use the static version of the CUDA runtime library if available" ON )
60+ set (CUDA_USE_STATIC_CUDA_RUNTIME ON )
61+ endif ()
62+
5063find_package (CUDA 7.0 REQUIRED)
5164
5265if (NOT CUDA_FOUND)
You can’t perform that action at this time.
0 commit comments