Index: CMakeLists.txt =================================================================== --- CMakeLists.txt +++ CMakeLists.txt @@ -163,10 +163,10 @@ # Support GPGPU code generation if the library is available. -if (CUDALIB_FOUND) +if (CUDA_FOUND) add_definitions(-DHAS_LIBCUDART) - INCLUDE_DIRECTORIES( ${CUDALIB_INCLUDE_DIR} ) -endif(CUDALIB_FOUND) + INCLUDE_DIRECTORIES( ${CUDA_INCLUDE_DIRS} ) +endif(CUDA_FOUND) if (OpenCL_FOUND) add_definitions(-DHAS_LIBOPENCL) INCLUDE_DIRECTORIES( ${OpenCL_INCLUDE_DIR} ) Index: cmake/FindCUDA.cmake =================================================================== --- cmake/FindCUDA.cmake +++ /dev/null @@ -1,23 +0,0 @@ -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) - -IF (CUDALIB_INCLUDE_DIR) - SET(CUDALIB_FOUND TRUE) -ENDIF (CUDALIB_INCLUDE_DIR) - -IF (CUDALIB_FOUND) - IF (NOT CUDA_FIND_QUIETLY) - MESSAGE(STATUS "Found CUDA: ${CUDALIB_INCLUDE_DIR}") - 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) Index: include/polly/Config/config.h.cmake =================================================================== --- include/polly/Config/config.h.cmake +++ include/polly/Config/config.h.cmake @@ -13,7 +13,7 @@ #ifndef POLLY_CONFIG_H #define POLLY_CONFIG_H -#cmakedefine CUDALIB_FOUND +#cmakedefine CUDA_FOUND #cmakedefine GPU_CODEGEN #endif Index: tools/CMakeLists.txt =================================================================== --- tools/CMakeLists.txt +++ tools/CMakeLists.txt @@ -1,5 +1,5 @@ -if (CUDALIB_FOUND OR OpenCL_FOUND) +if (CUDA_FOUND OR OpenCL_FOUND) add_subdirectory(GPURuntime) -endif (CUDALIB_FOUND OR OpenCL_FOUND) +endif (CUDA_FOUND OR OpenCL_FOUND) set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} PARENT_SCOPE)