generate visual studio 2019 arch default


Is the arch defaut 32bit-build ?

The command line cmake -G "Visual Studio 16 2019" will generate a Visual Studio .sln file for a 32-bit build?
If it is, should I command the cmake -G "Visual Studio 16 2019" -A Win64 for a 64-bit build

The default changed to “the same as the host” around 2019 I think. If you want to be explicit, -A x64 is the way to go.


1 Like

@ben.boeckel is correct. Here are the docs for reference.

VS2017 uses x86 host by default

VS2019+ uses x64 host by default: