I am trying to build this project, which has CUDA as a dependency. But the cmake script cannot find the CUDA installation on the system:
cls ~/workspace/gpucluster/cluster/build $ cmake ..
-- The C compiler identification is GNU 4.7.1
-- The CXX compiler identification is GNU 4.7.1
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /usr/share/cmake/Modules/FindCUDA.cmake:488 (message):
Specify CUDA_TOOLKIT_ROOT_DIR
Call Stack (most recent call first):
CMakeLists.txt:20 (find_package)
-- Configuring incomplete, errors occurred!
I've tried adding it as an environment variable to .bashrc
, to no effect:
export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5
How do I Specify CUDA_TOOLKIT_ROOT_DIR
correctly?