
This file provides command-line arguments and environment variables that are passed to CMake when you build the projects. The options that you choose in the editor are written to a file called CMakeSettings.json. The settings that you see in the editor might vary depending on which configuration is selected. You can add more configurations by choosing the green plus sign. Visual Studio provides one 圆4-Debug configuration by default.

Now you see the Settings Editor with the installed configurations on the left. To open the CMake settings editor, select the Configuration drop-down in the main toolbar and choose Manage Configurations.

However, if you prefer to edit the file directly, you can select the Edit JSON link in the upper right of the editor. It's intended to be a simpler alternative to manually editing the CMakeSettings.json file. The editor lets you add CMake configurations and customize their settings easily. If you maintain projects that use a CMakeSettings.json file for CMake build configuration, Visual Studio 2019 and later versions provide a CMake settings editor. For more information on CMakePresets.json, see Configure and build with CMake Presets. CMakePresets.json is supported directly by CMake and can be used to drive CMake generation and build from Visual Studio, from VS Code, in a Continuous Integration pipeline, and from the command line on Windows, Linux, and Mac. CMakePresets.json is supported by Visual Studio 2019 version 16.10 or later and is the recommended CMake configuration file. Visual Studio uses a CMake configuration file to drive CMake generation and build.
