Search code examples
bashterminalcudacmaketorch

cmake set variable not added / not used


I'm missing the variable CUDA_TOOLKIT_ROOT_DIR to install cutorch.

Although I'm doing cmake -DCUDA_TOOLKIT_ROOT_DIR="/usr/local/cuda"it is still missing the variable when I try to install with luarocks install cutorch.

I tried to empty the cache. Then on rebuild it says:

CMake Warning:
   Manually-specified variables were not used by the project:

CUDA_TOOLKIT_ROOT_DIR

-- Build files have been written to: /Users/vinni/torch

How can I get the variable to stay?


Solution

  • I my case the /usr/local/coda folder wasn't empty, but there were plenty of files missing. I reinstalled cuda and now everything works. Without rewriting any variables.