Use 64-bit MSBuild.exe on 64-bit hosts
I have several builds failing as MSBuild.exe runs out of virtual address space (the actual machine still has around 16 GiB of free memory). Switching to the 64-bit MSBuild.exe would probably fix that, but CMake always selects the 32-bit MSBuild.exe as a build tool with --build
, even when -T host=x64
is set.
Manually setting -DCMAKE_MAKE_PROGRAM:PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\MSBuild.exe"
works as a workaround, but requires me to hardcode tool paths or go looking for them myself, which I'd rather avoid.
Possibly related to #16782 although this feature request is aiming at better default behaviour.