I installed cuda toolkit, which includes nvcc, using the official Nvidia conda repo.
It works when I manually invoke nvcc on terminal, but when I create a Cuda project in CLion, on startup of the project I get
Failed to find nvcc.
Compiler requires the CUDA toolkit. Please set the CUDAToolkit_ROOT
variable.
Makes sense; it's not in my path, so I go to CMakeLists.txt tab in CLion and put set(CMAKE_CUDA_COMPILER "/home/xdavidliu/.conda/envs/foo-conda-env/bin/nvcc"). However, nothing changes; still same error message. What am I doing wrong?
I needed to go to Settings -> Build, Execution, Deps -> CMake, then under CMake options, put
Then it worked.
Probably related to this