You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/build/customize-cmake-settings.md
+45-1Lines changed: 45 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ For Visual Studio 2019 to 2022, select your version by using the version selecto
17
17
18
18
::: moniker-end
19
19
20
-
::: moniker range="<=msvc-170"
20
+
::: moniker range=">=msvc-160 <=msvc-170"
21
21
22
22
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. *`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. For more information on *`CMakePresets.json`*, see [Configure and build with CMake Presets](cmake-presets-vs.md).
23
23
@@ -171,6 +171,50 @@ For more information about each of the properties in the file, see [CMakeSetting
171
171
172
172
::: moniker-end
173
173
174
+
::: moniker range="<=msvc-150"
175
+
176
+
Visual Studio 2017 provides several CMake configurations that define how CMake is invoked to create the CMake cache for a given project. To add a new configuration, select the configuration drop-down in the toolbar and choose **Manage Configurations**:
177
+
178
+

179
+
180
+
You can choose from the list of predefined configurations:
181
+
182
+

183
+
184
+
The first time you select a configuration, Visual Studio creates a *`CMakeSettings.json`* file in your project's root folder. This file is used to re-create the CMake cache file, for example after a **Clean** operation.
185
+
186
+
To add another configuration, right-click *`CMakeSettings.json`* and choose **Add Configuration**.
187
+
188
+

189
+
190
+
You can also edit the file using the **CMake Settings Editor**. Right-click on *`CMakeSettings.json`* in **Solution Explorer** and choose **Edit CMake Settings**. Or, select **Manage Configurations** from the configuration drop-down at the top of the editor window.
191
+
192
+
You can also directly edit *`CMakeSettings.json`* to create custom configurations. The following example shows a sample configuration, which you can use as a starting point:
0 commit comments