<div dir="ltr">Hello,<div><br></div><div>I have a problem with using CUDA package in cmake. </div><div><br></div><div>I've installed CUDA, version 9.0, downloaded from here: <a href="https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal">https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1604&target_type=runfilelocal</a></div><div><br></div><div>and then to my CMakeList.txt file I added line:</div><div>  find_package (CUDA REQUIRED)<br></div><div><br></div><div>but while running command cmake .. I was getting the following error:</div><div>  <font color="#3d85c6">CMake Error at /usr/share/cmake-3.5/Modules/FindCUDA.cmake:617 (message):</font></div><div><font color="#3d85c6">  Specify CUDA_TOOLKIT_ROOT_DIR</font></div><div><font color="#3d85c6">  Call Stack (most recent call first):</font></div><div><font color="#3d85c6">  CMakeLists.txt:13 (find_package)</font></div><div><br></div><div>I looked for some information and tried the following command:</div><div><br></div><div>   cmake -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda ..<br></div><div><br></div><div>After that I am getting still some errors:</div><div><br></div><div><font color="#3d85c6">  CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):</font></div><div><font color="#3d85c6">  Could NOT find CUDA (missing: CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS</font></div><div><font color="#3d85c6">  CUDA_CUDART_LIBRARY)</font></div><div><font color="#3d85c6">  Call Stack (most recent call first):</font></div><div><font color="#3d85c6">  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)</font></div><div><font color="#3d85c6">  /usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)</font></div><div><font color="#3d85c6">  CMakeLists.txt:13 (find_package)</font></div><div><br></div><div>Can anybody help me with that?</div><div><br></div></div>