Skip to content

Commit f8f8d17

Browse files
author
Colin Robertson
authored
Merge pull request #3447 from sweemer/cmake-presets-vs
Update cmake-presets-vs.md
2 parents 0e88546 + 2349f3e commit f8f8d17

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

docs/build/cmake-presets-vs.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,24 @@ Build with `clang`:
225225
}
226226
```
227227

228+
If you use either `Visual Studio 16 2019` or `Visual Studio 17 2022` as your generator, you can use the `toolset` Configure Preset to specify the `ClangCL` toolset:
229+
230+
```json
231+
"cacheVariables": {
232+
"CMAKE_BUILD_TYPE": "Debug",
233+
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
234+
},
235+
"toolset": "ClangCL",
236+
237+
"vendor": {
238+
"microsoft.com/VisualStudioSettings/CMake/1.0": {
239+
"intelliSenseMode": "windows-clang-x64"
240+
}
241+
}
242+
```
243+
244+
For more information on generators that support the `toolset` specification, see [`CMAKE_GENERATOR_TOOLSET`](https://cmake.org/cmake/help/latest/variable/CMAKE_GENERATOR_TOOLSET.html) in the CMake documentation.
245+
228246
> [!IMPORTANT]
229247
> In Visual Studio 2019, you must explicitly specify a Clang IntelliSense mode when you're building with `clang` or `clang-cl`.
230248

0 commit comments

Comments
 (0)