Set cuda path default


I remember in older version of clang (e.g. 4.0), I could set the env variable CUDAPATH=… to set the default path to cuda.
In newer version (I am using 6.0), I can use the flag “–cuda-path=…”, but I was wondering if there is a way to set that path once to avoid to pass that flag everytime.


Hi Simone,

I don't think an environment variable was ever used in upstream trunk, I only remember seeing this in IBM's clang-ykt fork. However, I committed an improvement just yesterday: Clang will now try to find ptxas in $PATH and if it is in a directory called bin/, add that's parent directory as a candidate CUDA installation. I think this should work for most HPC systems that use environment modules to manage their CUDA installations...
Unfortunately, I still have to write documentation about this mechanism so you'd have to refer to the source code for details.



you are right, sorry for the confusion.
Your patch does what I needed.