title: How to let cmake find CUDA
body: <p>I am trying to build <a href="http://www.staff.science.uu.nl/~faggi101/gpucluster.tar.gz">this project</a>, which has CUDA as a dependency. But the cmake script cannot find the CUDA installation on the system:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>-- Configuring incomplete, errors occurred!</p>
  
  <p>I've tried adding it as an environment variable to <code>.bashrc</code>, to no effect:</p>
  
  <pre><code>export CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5
  </code></pre>
  
  <p>How do I <code>Specify CUDA_TOOLKIT_ROOT_DIR</code> correctly?</p>