For our software, we want to set a fixed MSVC compiler version (including patch version) when building and want to build two different versions:
cmake -G "Visual Studio 17 2022" -A x64,version=10.0 -T "v143,version=14.44.35207,cuda=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8"
cmake -G "Visual Studio 17 2022" -A x64,version=10.0 -T "v143,version=14.38.33130,cuda=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.8"
As it’s not possible to select a specific patch version via the installer, I tried to use two different Visual Studio installations. However, it seems that cmake only consider the latest installation. Is that correct or am I doing something wrong?
So cmake normally should be able to find and use msvc versions from all VS installation?
It does work for me though when I use only one VS installation. That’s unfortunately not an option, because the versions are externally fixed and differ (in their patch version) from what the VS installer provides.