Error Building with Ninja
Attempting to build VTK 9.0.3 with Ninja on Windows 10 in x64-bit mode gives the following error in CMake-GUI
The CUDA compiler identification is unknown
Detecting CUDA compiler ABI info
Detecting CUDA compiler ABI info - failed
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/bin/nvcc.exe
Check for working CUDA compiler: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/bin/nvcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.21/Modules/CMakeTestCUDACompiler.cmake:56 (message):
The CUDA compiler
"C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v11.4/bin/nvcc.exe"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: C:/VTK/build/CMakeFiles/CMakeTmp
Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_a0bc7 && [1/2] Building CUDA object CMakeFiles\cmTC_a0bc7.dir\main.cu.obj
FAILED: CMakeFiles/cmTC_a0bc7.dir/main.cu.obj
C:\PROGRA~1\NVIDIA~2\CUDA\v11.4\bin\nvcc.exe -c C:\VTK\build\CMakeFiles\CMakeTmp\main.cu -o CMakeFiles\cmTC_a0bc7.dir\main.cu.obj
nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/HostX64/x64/../../../../../../../VC/Auxiliary/Build/vcvars64.bat'
ninja: build stopped: subcommand failed.
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:129 (enable_language)
Configuring incomplete, errors occurred!
See also "C:/VTK/build/CMakeFiles/CMakeOutput.log".
See also "C:/VTK/build/CMakeFiles/CMakeError.log".