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
### Inherited environments (Visual Studio 2017 version 15.5)
246
246
247
-
CmakeSettings.json now supports inherited environments. This feature enables you to (1) inherit default environments and (2) create custom environment variables that are passed to CMake.exe when it runs.
247
+
CMakeSettings.json now supports inherited environments. This feature enables you to (1) inherit default environments and (2) create custom environment variables that are passed to CMake.exe when it runs.
248
248
249
249
```json
250
250
"inheritEnvironments": [ "msvc_x64_x64" ]
@@ -266,7 +266,7 @@ The following table shows the default values and their command line equivalents:
266
266
|msvc_arm64_x64|Compile for ARM64 using 64-bit tools|
267
267
268
268
### Custom environment variables
269
-
In CmakeSettings.json, you can define custom environment variables globally or per-configuration in the **environments** property. The following example defines one global variable, **BuildDir**, which is inherited in both the x86-Debug and x64-Debug configurations. Each configuration uses the variable to specify the value for the **buildRoot** property for that configuration. Note also how each configuration uses the **inheritEnvironments** property to specify a variable that applies only to that configuration.
269
+
In CMakeSettings.json, you can define custom environment variables globally or per-configuration in the **environments** property. The following example defines one global variable, **BuildDir**, which is inherited in both the x86-Debug and x64-Debug configurations. Each configuration uses the variable to specify the value for the **buildRoot** property for that configuration. Note also how each configuration uses the **inheritEnvironments** property to specify a variable that applies only to that configuration.
270
270
271
271
```json
272
272
{
@@ -285,8 +285,7 @@ In CmakeSettings.json, you can define custom environment variables globally or p
285
285
"configurationType": "Debug",
286
286
// Inherit the defaults for using the MSVC x86 compiler.
287
287
"inheritEnvironments": [ "msvc_x86" ],
288
-
"buildRoot": "${env.BuildDir}\\${name}"
289
-
},
288
+
"buildRoot": "${env.BuildDir}\\${name}"M },
290
289
{
291
290
"name": "x64-Debug",
292
291
"generator": "Ninja",
@@ -341,7 +340,7 @@ In the next example, the x86-Debug configuration defines its own value for the *
341
340
}
342
341
```
343
342
344
-
## Cmake configure step
343
+
## CMake configure step
345
344
346
345
When significant changes are made to the CMakeSettings.json or to CMakeLists.txt files, Visual Studio automatically re-runs the CMake configure step. If the configure step finishes without errors, the information that is collected is available in C++ IntelliSense and language services and also in build and debug operations.
0 commit comments