Can't build 3.3.0 on Windows 10 under CMake
I've downloaded the latest 3.3.0. I'm on a plain vanilla Windows 10 system w/ Visual Studio 2017 latest edition installed on it. Windows x64. CMake is version 3.9.4. I load up cmake, turn off a few things (tests, docs, apps, calib3d), and choose the x64 2017 compiler... I also have the very latest cuda sdk installed.
when I build, it chokes trying to build the .CU files, it can't find $(VCINSTALLDIR)/bin, which doesn't exist on my machine. I can't imagine I'm the ONLY person getting this error?
Are you sure that CUDA is compatible with vs 2017?
You're right, it wasn't compatible. I uninstalled Cuda 8.0 SDK, installed Cuda 9.0 SDK, made the required changes to cmake's FindCuda.cmake, made the required changes to saturate_cast.hpp, and deleted cmake's cache and reconfigured. Now, when I try to build it says:
3>Building NVCC (Device) object modules/world/CMakeFiles/cuda_compile.dir/__/core/src/cuda/Debug/cuda_compile_generated_gpu_mat.cu.obj 3>CMake Error at cuda_compile_generated_gpu_mat.cu.obj.cmake:206 (message): 3> Error generating
which ain't that illuminating.
CMake defaults CUDA_HOST_COMPILER to $(VCInstallDir)\bin, which on my system (with VS2017 installed), VCInstallDir = c:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\, and that directory does not have a "bin" directory in it. When I look at the cuda flags in the cmake generated vxcproj, I see it's trying to reference --ccbin at the above non-existent directory. When I try to change that directory (in cmake) to something else and regenerate the files, it still stays at $(VCInstallDir)/bin, it has no effect.
What should the directory really point to? I don't know what a CUDA_HOST_COMPILER should point to.
I've been fooling around w/ the flags sent to the compiler on the command line and if I remove the --ccbin xxx from the parameters to nvcc, it compiles. If I pass in the non-existent path, the compile fails. Something is wrong with CUDA_HOST_COMPILER, it shouldn't be set to $(VCInstallDir)\bin. But what should it be set to?
try to disable world with cuda. You can find a cmakeoutput with cuda on linux here
But I want the world to build. Besides, it should work. Help me figure out what is wrong with CUDA_HOST_COMPILER!