I have two x64 Windows machines. One has Visual Studio Build Tools 2017 installed, the other has Visual Studio Build Tools 2019 installed.
On the machine with Visual Studio Build Tools 2019 I see:
>cmake -G Ninja ..
-- The CXX compiler identification is MSVC 19.23.28107.0
-- The C compiler identification is MSVC 19.23.28107.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works
i.e. x64 tools
On the machine with Visual Studio Build Tools 2017 I see:
>cmake -G Ninja ..
-- The CXX compiler identification is MSVC 19.16.27034.0
-- The C compiler identification is MSVC 19.16.27034.0
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe -- works
i.e. x86 tools
How can I force Ninja to use x64 tools on both platforms?