Is there a way to configure the Visual Studio 2019 integrated CMake version? There are features in the latest CMake version that I would like to use, but I'm forced to build from the command line in this case. If I build from the VS IDE, the CMake version used is the Visual Studio-integrated one. I would like to change it if possible.
Running CMake for Windows / Microsoft Visual C++ (MSVC) Run cmake-gui.exe, which should be in your Start menu under Program Files, there may also be a shortcut on your desktop, or if you built from source, it will be in the build directory.
CMake Generators are platform-specific so each may be available only on certain platforms. The cmake(1) command-line tool --help output lists available generators on the current platform. Use its -G option to specify the generator for a new build tree.
To open the CMake settings editor, select the Configuration drop-down in the main toolbar and choose Manage Configurations. Now you see the Settings Editor with the installed configurations on the left.
To run an explicitely installed CMake you should download a CMake suitable for your platform from https://cmake.org/download install it and add the bin folder of the installation directory to your PATH variable, e.g. set PATH=C:\Program Files\CMake\bin;%PATH% on Windows.
You can download the latest CMake from here to your system. To point Visual Studio to this latest version, you have to edit your CMakeSettings.json file. You must change the value of the cmakeExecutable
option to the installed location of the latest CMake version.
CMakeSettings.json:
...
"cmakeExecutable": "C:/path/to/new/cmake/executable",
...
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