I have been trying to install ROOT with CUDA support. I have also looked at some similar issues in the forum where I tried upgrading cmake to a newer version.
Here is the error I get:
[xola@wolf root-6.18.04-build]$ sudo cmake ../root-6.18.04/ -Dmathore=ON -Dcuda=ON -DCMAKE_INSTALL_PREFIX=/opt/root/root-6.18.04-install/ -DCMAKE_CUDA_HOST_COMPILER=/usr/local/cuda-10.0/bin/nvcc
[sudo] password for xola:
-- ROOT default compression algorithm: zlib
-- Found GCC. Major version 4, minor version 8
-- Found a 64bit system
-- Found GNU compiler collection
-- ROOT Platform: linux
-- ROOT Architecture: linuxx8664gcc
-- Build Type: RelWithDebInfo
-- Compiler Flags: -std=c++11 -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread
-- Looking for ZLib
-- Looking for Freetype
-- Looking for PCRE
-- Building LZMA version 5.2.4 included in ROOT itself
-- Looking for X11
-- Could NOT find GIF (missing: GIF_LIBRARY GIF_INCLUDE_DIR)
-- Could NOT find TIFF (missing: TIFF_LIBRARY TIFF_INCLUDE_DIR)
-- Building AfterImage library included in ROOT itself
-- Looking for GSL
-- Looking for python
-- Looking for OpenGL
-- The CUDA compiler identification is unknown
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:1335 (enable_language):
No CMAKE_CUDA_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable "CUDACXX" or the CMake cache entry CMAKE_CUDA_COMPILER to the full
path to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
-- Configuring incomplete, errors occurred!
See also "/opt/root/root-6.18.04-build/CMakeFiles/CMakeOutput.log".
See also "/opt/root/root-6.18.04-build/CMakeFiles/CMakeError.log".
Are you sure the compiler, nvcc is in your path ?
Have you tried doing what make suggested ? Defining for example CUDACXX ?
I would need to se you cmake output log and error to understand it better what is happening