Skip to content

Commit 2acb31b

Browse files
Complete CMake file-api advanced text
1 parent d9d3d6d commit 2acb31b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/build/cmake-projects-in-visual-studio.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ You can add an existing CMake cache to an open project. It's done the same way y
6565

6666
### Advanced CMake cache troubleshooting
6767

68-
As described in our blog post on [multi-root workspaces and file-based API](https://devblogs.microsoft.com/cppblog/visual-studio-code-cmake-tools-extension-multi-root-workspaces-and-file-based-api/), Visual Studio uses CMake's [file-based API](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html) for CMake versions >= 3.14 to populate the editor with information specific to your project structure. It may be necessary for your custom or preferred tools to populate a **query.json** file before generating the CMake cache. In your build output folder (the one containing **CMakeCache.txt**), create a query file named **.cmake/api/v1/query/client-MicrosoftVS/query.json** with the contents:
68+
As described in our blog post on [multi-root workspaces and file-based API](https://devblogs.microsoft.com/cppblog/visual-studio-code-cmake-tools-extension-multi-root-workspaces-and-file-based-api/), Visual Studio uses CMake's [file-based API](https://cmake.org/cmake/help/latest/manual/cmake-file-api.7.html) for CMake versions >= 3.14 to populate the editor with information specific to your project structure. Before generating the CMake cache it may be necessary for your custom or preferred tools create a query file named **.cmake/api/v1/query/client-MicrosoftVS/query.json** in your build output folder (the one containing **CMakeCache.txt**) with this content:
6969
```
7070
{"requests":[{"kind":"cache","version":2},{"kind":"cmakeFiles","version":1},{"kind":"codemodel","version":2}]}
7171
```
7272

73-
When your custom or preferred tools generate your cache, CMake will place files under .cmake/api/v1/response that Visual Studio will use to populate the editor with information specific to your project structure.
73+
When your custom or preferred tools generate your cache, CMake will place files under **.cmake/api/v1/response** that Visual Studio will use to populate the editor with information specific to your project structure.
7474

7575
## Building CMake projects
7676

0 commit comments

Comments
 (0)