2012-06-06 20:16:10 +08:00
|
|
|
IF (NOT CUDA_HEADER_PREFIX)
|
|
|
|
SET(CUDA_HEADER_PREFIX "/usr/local/cuda/include")
|
|
|
|
ENDIF (NOT CUDA_HEADER_PREFIX)
|
|
|
|
|
|
|
|
FIND_PATH(CUDALIB_INCLUDE_DIR
|
|
|
|
NAMES cuda.h
|
|
|
|
PATHS ${CUDA_HEADER_PREFIX})
|
|
|
|
|
|
|
|
FIND_LIBRARY(CUDALIB_LIBRARY NAMES cuda)
|
|
|
|
|
2012-07-05 05:45:03 +08:00
|
|
|
IF (CUDALIB_INCLUDE_DIR)
|
2012-06-06 20:16:10 +08:00
|
|
|
SET(CUDALIB_FOUND TRUE)
|
2012-07-05 05:45:03 +08:00
|
|
|
ENDIF (CUDALIB_INCLUDE_DIR)
|
2012-06-06 20:16:10 +08:00
|
|
|
|
|
|
|
IF (CUDALIB_FOUND)
|
|
|
|
IF (NOT CUDA_FIND_QUIETLY)
|
2012-07-05 05:45:03 +08:00
|
|
|
MESSAGE(STATUS "Found CUDA: ${CUDALIB_INCLUDE_DIR}")
|
2012-06-06 20:16:10 +08:00
|
|
|
ENDIF (NOT CUDA_FIND_QUIETLY)
|
|
|
|
ELSE (CUDALIB_FOUND)
|
|
|
|
IF (CUDA_FIND_REQUIRED)
|
|
|
|
MESSAGE(FATAL_ERROR "Could not find CUDA")
|
|
|
|
ENDIF (CUDA_FIND_REQUIRED)
|
|
|
|
ENDIF (CUDALIB_FOUND)
|