Parallel cuda build

I configured the build with cmake -DCUDA_NVCC_FLAGS="-t 20" (…) in order to have parallel build with nvcc, but I could not see any benefits (compilation seems mostly monothreaded).

Is is the proper way to pass the multithreaded configuration to nvcc ?

Is there anything else I can do to take advantage of many threads at build time ?

I use this command to build opencv: MSBuild.exe /m $solution /verbosity:m

You could try building with ninja.

cmake configuration with Ninja as generator is broken.

I would like to find the right way to build with msbuild and nvcc in parallel.

Interesting. I only use it to speed up OpenCV compilation with CUDA, which configuration options is it broken for?

In your previous post you said.

Building with ninja if your config allows will reduce the build time to ~30 mins.

Just out of interest why do you need to use msbuild, what is wrong with just startign the build with cmake directly?