With Visual Studio 2017, I used the generator "Visual Studio 15 2017 Win64"
for cmake
. After updating to Visual Studio 2019, what's the new corresponding generator?
Asked
Active
Viewed 2.4k times
16

locke14
- 1,335
- 3
- 15
- 36
-
9`Visual Studio 16 2019` but you need to use the -A option to specify the architecture (default is 64 bit). And you need CMake-3.14 https://cmake.org/cmake/help/v3.14/generator/Visual%20Studio%2016%202019.html – drescherjm Apr 16 '19 at 12:53
1 Answers
28
from your directory where the cmakelist.txt exists. here are steps:
- mkdir build
- cd build
- depending upon the architecture you're using
cmake -G "Visual Studio 16 2019" -A x64 ../"
other options are:
cmake -G "Visual Studio 16 2019" -A Win32
cmake -G "Visual Studio 16 2019" -A x64
cmake -G "Visual Studio 16 2019" -A ARM
cmake -G "Visual Studio 16 2019" -A ARM64
it will generate makefiles required and serves your purpose
furthermore, you could
devenv <nameof solutions file> /build <Debug/Release option>
for building your project

caps
- 1,225
- 14
- 24

Amaresh Kumar
- 586
- 1
- 8
- 20