Skip to content

Commit 453dc40

Browse files
authored
Fix environment name.
1 parent a78f16c commit 453dc40

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/build/cmake-presets-vs.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,14 @@ The official [CMake documentation](https://cmake.org/cmake/help/latest/manual/cm
205205

206206
### Select your compilers
207207

208-
You can set C and C++ compilers by using `environmentVariables.CC` and `environmentVariables.CXX` in a Configure Preset. For more information, see [`CC`](https://cmake.org/cmake/help/latest/envvar/CC.html)/[`CXX`](https://cmake.org/cmake/help/latest/envvar/CXX.html).
208+
You can set C and C++ compilers by using `environment.CC` and `environment.CXX` in a Configure Preset. For more information, see [`CC`](https://cmake.org/cmake/help/latest/envvar/CC.html)/[`CXX`](https://cmake.org/cmake/help/latest/envvar/CXX.html).
209209

210210
Use the following examples to build with `cl.exe` and `clang-cl.exe` from Visual Studio. The C++ Clang tools for Windows components must be installed for you to build with `clang-cl`.
211211

212212
Build with `cl.exe`:
213213

214214
```json
215-
"environmentVariables": {
215+
"environment": {
216216
"CC": "cl",
217217
"CXX": "cl"
218218
},
@@ -225,7 +225,7 @@ Build with `cl.exe`:
225225
Build with `clang`:
226226

227227
```json
228-
"environmentVariables": {
228+
"environment": {
229229
"CC": "clang-cl",
230230
"CXX": "clang-cl"
231231
},
@@ -268,7 +268,7 @@ To reproduce these builds outside Visual Studio, see [Run CMake from the command
268268
To build on Linux or without the Visual C++ toolset, specify the name of a compiler on your `PATH` instance, or an environment variable that evaluates to the full path of a compiler. Full paths are discouraged so that the file can remain shareable. A preset that builds with GCC version 8 might look like this:
269269

270270
```json
271-
"environmentVariables": {
271+
"environment": {
272272
"CC": "gcc-8",
273273
"CXX": "g++-8"
274274
},

0 commit comments

Comments
 (0)