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?
Visual Studio uses a CMake configuration file to drive CMake generation and build. CMakePresets. json is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file.
Introduction. A CMake Generator is responsible for writing the input files for a native build system. Exactly one of the CMake Generators must be selected for a build tree to determine what native build system is to be used.
CMake is a build tool in a special way. It can create makefiles and build them but you can also tell cmake to create a visual studio solution if you like. The same goes with external programs. They are the choice of the maintainer of the library you use and there are no standards for things like code generation.
from your directory where the cmakelist.txt exists. here are steps:
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With