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/cmake-projects-in-visual-studio.md
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@ When you **open a folder** containing a *`CMakeLists.txt`* file, the following t
39
39
- In the background, Visual Studio starts to index the source files to enable IntelliSense, browsing information, refactoring, and so on. As you work, Visual Studio monitors changes in the editor and also on disk to keep its index in sync with the sources.
40
40
41
41
> [!NOTE]
42
-
> Starting in Visual Studio 17.1 Preview 2 if your folder does not contain a root `CMakeLists.txt`then you will be prompted whether you'd like to enable CMake integration or not. For more information, see [CMake Partial Activation](#cmake-partial-activation).
42
+
> Starting in Visual Studio 2022 version 17.1 Preview 2, if your folder doesn't contain a root `CMakeLists.txt` you'll be prompted whether you'd like to enable CMake integration or not. For more information, see [CMake partial activation](#cmake-partial-activation).
43
43
44
44
Once CMake cache generation has succeeded, you can also view your projects organized logically by targets. Choose **Targets view** from the dropdown in the **Solution Explorer** toolbar:
45
45
@@ -147,14 +147,18 @@ Visual Studio allows you to debug a process running on a remote Linux system or
147
147
148
148

Starting in Visual Studio 17.1 Preview 2, CMake functionality will not automatically enable if your root folder does not contain a `CMakeLists.txt`. Instead, a dialog will prompt you on whether you'd like to enable CMake functionality for your project. If you decline, CMake cache generation will not start and CMake configurations (from `CMakeSettings.json` or `CMakePresets.json`) will not appear in the configuration dropdown. If you accept, you will be taken to a workspace-level configuration file, `CMakeWorkspaceSettings.json` (stored in the `.vs` directory), to specify the folders you'd like to enable CMake for (these folders contain your root `CMakeLists.txt`files). The accepted properties are
Starting in Visual Studio 2022 version 17.1 Preview 2, CMake functionality won't be enabled automatically if your root folder doesn't contain a `CMakeLists.txt` file. Instead, a dialog will prompt you on whether you'd like to enable CMake functionality for your project. If you decline, CMake cache generation won't start and CMake configurations (from `CMakeSettings.json` or `CMakePresets.json`) won't appear in the configuration dropdown. If you accept, you'll be taken to a workspace-level configuration file, `CMakeWorkspaceSettings.json` (stored in the `.vs` directory), to specify the folders you'd like to enable CMake for. (These folders contain your root `CMakeLists.txt` files).
153
+
154
+
The accepted properties are:
155
+
152
156
| Property | Description |
153
157
|--|--|
154
158
|`enableCMake`| Enable Visual Studio's integration for this workspace. |
155
-
|`sourceDirectory`| A string or array of strings specifying the directory or directories with `CMakeLists.txt`. Macros (such as `${workspaceRoot}`) are allowed and relative paths are relative to the workspace root. Note that directories outside of the current workspace will be ignored. |
159
+
|`sourceDirectory`| A string or array of strings specifying the directory or directories with `CMakeLists.txt`. Macros (such as `${workspaceRoot}`) are allowed. Relative paths are relative to the workspace root. Directories outside of the current workspace will be ignored. |
156
160
157
-
At any time you can reach `CMakeWorkspaceSettings.json` through the `Project > CMake WorkspaceSettings`menu command (even if CMake functionality is currently disabled).
161
+
You can reach `CMakeWorkspaceSettings.json` through the **Project** > **CMake Workspace Settings**menu command at any time, even if CMake functionality is currently disabled.
0 commit comments