Commit 56f83929 authored by Tristan Webb's avatar Tristan Webb

Include and link cuda and CUDNN when DUSE_CUDA=True

parent f8c6734a
......@@ -82,6 +82,8 @@ set (SRC
if(USE_CUDA)
find_package(CUDA 8 REQUIRED)
if(CUDA_FOUND)
include_directories(SYSTEM ${CUDA_INCLUDE_DIR})
link_directories(${CUDA_LIB_DIR})
if (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND
NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0 AND
CUDA_HOST_COMPILER STREQUAL CMAKE_C_COMPILER)
......@@ -96,6 +98,9 @@ if(USE_CUDA)
"If cuDNN is installed, try setting -DCUDNN_ROOT_DIR"
"Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF")
set(USE_CUDA OFF)
else()
include_directories(SYSTEM ${CUDNN_INCLUDE_DIR})
link_directories(${CUDNN_LIB_DIR})
endif()
else()
message(WARNING "Not compiling with CUDA. Suppress this warning with -DUSE_CUDA=OFF")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment