Hello,

I have a problem with using CUDA package in cmake.

I've installed CUDA, version 9.0, downloaded from here:
https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal

and then to my CMakeList.txt file I added line:
  find_package (CUDA REQUIRED)

but while running command cmake .. I was getting the following error:
  CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message):
  Specify CUDA_TOOLKIT_ROOT_DIR
  Call Stack (most recent call first):
  CMakeLists.txt:13 (find_package)

I looked for some information and tried the following command:

   cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda ..

After that I am getting still some errors:

  CMake Error at
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148
(message):
  Could NOT find CUDA (missing: CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS
  CUDA_CUDART_LIBRARY)
  Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388
(_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.5/Modules/FindCUDA.cmake:949
(find_package_handle_standard_args)
  CMakeLists.txt:13 (find_package)

Can anybody help me with that?
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to