commit
7a37936adf
|
@ -764,13 +764,9 @@ if(CUDA_USE_STATIC_CUDA_RUNTIME)
|
||||||
if (NOT APPLE)
|
if (NOT APPLE)
|
||||||
# Here is librt that has things such as, clock_gettime, shm_open, and shm_unlink.
|
# Here is librt that has things such as, clock_gettime, shm_open, and shm_unlink.
|
||||||
find_library(CUDA_rt_LIBRARY rt)
|
find_library(CUDA_rt_LIBRARY rt)
|
||||||
find_library(CUDA_dl_LIBRARY dl)
|
|
||||||
if (NOT CUDA_rt_LIBRARY)
|
if (NOT CUDA_rt_LIBRARY)
|
||||||
message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
|
message(WARNING "Expecting to find librt for libcudart_static, but didn't find it.")
|
||||||
endif()
|
endif()
|
||||||
if (NOT CUDA_dl_LIBRARY)
|
|
||||||
message(WARNING "Expecting to find libdl for libcudart_static, but didn't find it.")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -793,13 +789,10 @@ set(CUDA_LIBRARIES)
|
||||||
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
|
if(CUDA_BUILD_EMULATION AND CUDA_CUDARTEMU_LIBRARY)
|
||||||
list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
|
list(APPEND CUDA_LIBRARIES ${CUDA_CUDARTEMU_LIBRARY})
|
||||||
elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY)
|
elseif(CUDA_USE_STATIC_CUDA_RUNTIME AND CUDA_cudart_static_LIBRARY)
|
||||||
list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
list(APPEND CUDA_LIBRARIES ${CUDA_cudart_static_LIBRARY} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS})
|
||||||
if (CUDA_rt_LIBRARY)
|
if (CUDA_rt_LIBRARY)
|
||||||
list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY})
|
list(APPEND CUDA_LIBRARIES ${CUDA_rt_LIBRARY})
|
||||||
endif()
|
endif()
|
||||||
if (CUDA_dl_LIBRARY)
|
|
||||||
list(APPEND CUDA_LIBRARIES ${CUDA_dl_LIBRARY})
|
|
||||||
endif()
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
# We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
|
# We need to add the default path to the driver (libcuda.dylib) as an rpath, so that
|
||||||
# the static cuda runtime can find it at runtime.
|
# the static cuda runtime can find it at runtime.
|
||||||
|
|
Loading…
Reference in New Issue