I just wanted to add that as of version 17.10 Visual Studio does not officially support CUDA 11 anymore (and vice versa).[1][2]
I tried compiling all combinations of vtk-m [master,release,2.1.0] and CUDA [12.4,12.5] on Windoes 11 / MSVC v17.10.1 today, and couldn't get it to work. Similar build errors with thrust in all combinations (e.g, "thrust::detail is ambiguous").
Possible Workarounds on Windows/Visual Studio:
Use CUDA 11.8 and downgrade to VS 17.9 (or at least it's toolset[3]). (I have not tried this.)
Use CUDA 11.8, keep VS 17.10, and disable the version checks in nvcc[1]. (Works for me, but proceed carefully.):
Create system environment variable before cmake/build of vtk-m: NVCC_PREPEND_FLAGS=-allow-unsupported-compiler (Setting this via CMake configure would be too late, since CUDA discovery fails during configure).
UPDATE 2024-09-04: For newer Visual Studio versions, there is an additional check to be disabled:
NVCC_PREPEND_FLAGS=-allow-unsupported-compiler -D_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH
(Let's hope there soon will be a vtk version with a newer vtk-m included, so we can finally remove this hack )