I am using CMake on Windows with Ninja generator
cmake -G Ninja ..
This uses the default Windows x86 toolchain. How to specify x64 using the Ninja generator?
PS: I know how to generate x64 with Visual Studio
cmake -G "Visual Studio 12 2013 Win64 ..
You have to set the compiler environment accordingly before calling
Ninja
generation. If you have Visual Studio 2013 installed at the standard installation path you call:Edit: Thanks for the hint from @Antwane: "Or simply run CMake command from a
Microsoft Visual Studio Command Prompt (x64)
. A shortcut to this prompt is located in Start Menu".The naming varies over the Visual Studio versions:
When I then look into the generated
CMakeCache.txt
file I see: