CMake error on CUDA toolkit


I installed CUDA using this command:

$ sudo apt install nvidia-cuda-dev

I tried to compile a CUDA program using CMake and got this error:

CMake Error at /usr/share/cmake/Modules/FindCUDA.cmake:488 (message):
Call Stack (most recent call first):
  CMakeLists.txt:20 (find_package)


Turns out that nvidia-cuda-dev does not install the CUDA toolkit or SDK. Though it is named like a development package in Linux typically is, it is not.

To install the CUDA toolkit use:

$ sudo apt install nvidia-cuda-toolkit

The CMake compile error went away after this πŸ™‚

Tried with: CUDA 5.5, CMake and Ubuntu 14.04

2 thoughts on “CMake error on CUDA toolkit

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.