What's the cmake generator for Visual Studio 2019

18,503

from your directory where the cmakelist.txt exists. here are steps:

  1. mkdir build
  2. cd build
  3. 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

Share:
18,503
locke14
Author by

locke14

C++ and Python coder!

Updated on June 28, 2022

Comments

  • locke14
    locke14 almost 2 years

    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?