[CMake] CMake CUDA 3.8+/9 support as a first class language with out Visual Studio Support... err what?

Brian J. Davis bitminer at gmail.com
Fri Jul 28 12:45:31 EDT 2017


@Robert

So how do I go about using it in 3.9?  And more importantly does it 
work?  Does it generate hybrid CPP/CU projects that can be compiled in 
visual studio the way FindCUDA (did/does?).

Currently using FindCUDA, but I have had some CUDA 7.5 / 8.0 and VS 
13/15 cats in a bag trouble.  Finally uninstalled CUDA 8.0  and had to 
reinstall/repair VS13 due to .NET goop removal with 8.0 somehow. Then 
reinstalled 7.5, but still no luck with SampleProjects from NVIDIA.  
Then removed 7.5 and reinstalled 8.0 and sample projects then built the 
8.0 projects and ran successfully with VS13.  NVIDIA states that cross 
mojonation with runtimes and drivers would work just swimmingly... and 
well I got news for them on that one. FindCUDA during 7.5 yeiled 
confusing warning saying that I was specifying 7.5, but it found 8.0 
even though 7.5 was installed as though FindCUDA did not seem to listen 
to the version I was specifying.

I upgraded CMake from 3.2 to 3.9 so I could set env{var} and use CMake's 
Open Project to set env build vars for VS to be used in project settings 
with outthe need for my run_vs.bat script CMake used to have to generate 
with configure_file. So with CMake, CUDA and Visual Studio it's like 
three cats in a bag and one is a like bobcat (CUDA) so it's kinda messy.


More information about the CMake mailing list