I have a problem with the iMSTK_ENABLE_CUDA_BACKEND when building the CMake project.
The error occurs after I set the CMAKE_CUDA_COMPILER to nvcc.exe
The CUDA compiler identification is unknown
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.17/Modules/CMakeTestCUDACompiler.cmake:46 (message):
The CUDA compiler
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/bin/nvcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: D:/SimRepo/iMSTK/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_591d9.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling CUDA source file main.cu...
D:\SimRepo\iMSTK\build\CMakeFiles\CMakeTmp>"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static -g -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /O2 /FdcmTC_591d9.dir\Debug\vc141.pdb /FS /Zi /MD " -o cmTC_591d9.dir\Debug\main.obj "D:\SimRepo\iMSTK\build\CMakeFiles\CMakeTmp\main.cu"
nvcc fatal : 32 bit compilation is only supported for Microsoft Visual Studio 2013 and earlier
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\BuildCustomizations\CUDA 10.2.targets(764,9): error MSB3721: The command ""C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin\nvcc.exe" -gencode=arch=compute_30,code=\"sm_30,compute_30\" --use-local-env -ccbin "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x86" -x cu -I"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\include" --keep-dir Debug -maxrregcount=0 --machine 32 --compile -cudart static -g -D"CMAKE_INTDIR=\"Debug\"" -D"CMAKE_INTDIR=\"Debug\"" -D_MBCS -Xcompiler "/EHsc /W1 /nologo /O2 /FdcmTC_591d9.dir\Debug\vc141.pdb /FS /Zi /MD " -o cmTC_591d9.dir\Debug\main.obj "D:\SimRepo\iMSTK\build\CMakeFiles\CMakeTmp\main.cu"" exited with code 1. [D:\SimRepo\iMSTK\build\CMakeFiles\CMakeTmp\cmTC_591d9.vcxproj]
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:72 (enable_language)
Configuring incomplete, errors occurred!
I also tried CUDA 7.5, 8.0, 9.0, 9.1, 9.2, 10.1. All of them have the same error.
Thank you very much in advance for helping me out.