I am trying to compile the example Cuda project given on
[url=“FindCuda.cmake”]http://www.sci.utah.edu/~abe/FindCuda.html[/url]
using Cmake and Win-Xp 64, but I keep getting the following error:
nvcc cannot find a supported cl version. Only MSVC 7.1 and MSVC 8.0 are supported
I have VS2005 on my machine.
Anyone has tried to use the Cmake files to compile on Xp-64 bit before ?
If so, please do let me know what you changed to get the project running.
Thanks a lot
This is a result of NVIDIA’s crappy design requirement that nvcc finds the 32-bit cl.exe be in the path. From that, it figures out where the 64-bit one is and uses it.
Don’t bother complaining on the forums: I’ve had a bug on file for this since the first release of CUDA 2.0 beta for vista64 and I happen to know that some of the people at NVIDIA working on CUDA agree with me. None of that changes the fact that it hasn’t been fixed yet <img src=‘http://hqnveipbwb20/public/style_emoticons/<#EMO_DIR#>/crying.gif’ class=‘bbc_emoticon’ alt=‘:’(’ />
Anyways, there is a simple but annoying workaround. Either specify
-ccbin;“C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin” in NVCC_FLAGS or put the following in FindCUDA.cmake:
if (CMAKE_CL_64)
set(nvcc_flags ${nvcc_flags} -ccbin “C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin”)
endif (CMAKE_CL_64)
Of course it is an awful stupid hack to hardcode the path to a different compiler than CMake finds, but NVDIA’s stupid design choice for nvcc finding and identifying cl.exe requires such.