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/clang-support-cmake.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Clang support is available in Visual Studio 2019.
17
17
18
18
You can use Visual Studio with Clang to edit and debug C++ CMake projects that target Windows or Linux.
19
19
20
-
**Windows**: Visual Studio 2019 version 16.1 includes support for editing, building, and debugging with Clang/LLVM in CMake projects targeting Windows.
20
+
**Windows**: Visual Studio 2019 version 16.1 includes support for editing, building, and debugging with Clang/LLVM in CMake projects targeting Windows.
21
21
22
22
**Linux**: For Linux CMake projects, no special Visual Studio support is required. You can install Clang using your distro's package manager, and add the appropriate commands in the CMakeLists.txt file.
Copy file name to clipboardExpand all lines: docs/build/cmakesettings-reference.md
+6-2Lines changed: 6 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@ When the active configuration specifies a Visual Studio generator, by default MS
116
116
-`name`: names the configuration. See [CMake predefined configuration reference](cmake-predefined-configuration-reference.md) for more information about the pre-defined configurations.
117
117
-`wslPath`: the path to the launcher of an instance of Windows Subsystem for Linux.
118
118
119
-
### Additional settings for CMake Linux projects.
119
+
### Additional settings for CMake Linux projects
120
120
121
121
-`remoteMachineName`: specifies the name of the remote Linux machine that hosts CMake, builds, and the debugger. Use the Connection Manager for adding new Linux machines. Supported macros include `${defaultRemoteMachineName}`.
122
122
-`remoteCopySourcesOutputVerbosity`: specifies the verbosity level of the source copying operation to the remote machine. May be one of ""Normal", "Verbose", or "Diagnostic".
@@ -127,6 +127,10 @@ When the active configuration specifies a Visual Studio generator, by default MS
127
127
-`remoteInstallRoot`: specifies the directory on the remote machine in which CMake generates install targets for the chosen generator. Supported macros include `${workspaceRoot}`, `${workspaceHash}`, `${projectFile}`, `${projectDir}`, `${thisFile}`, `${thisFileDir}`, `${name}`, `${generator}`, and `${env.VARIABLE}` where `VARIABLE` is an environment variable that has been defined at the system, user, or session level.
128
128
-`remoteCopySources`: A `boolean` that specifies whether Visual Studio should copy source files to the remote machine. The default is true. Set to false if you manage file synchronization yourself.
129
129
-`remoteCopyBuildOutput`: A `boolean` that specifies whether to copy the build outputs from the remote system.
130
+
-`remoteCopyAdditionalIncludeDirectories`:
131
+
-`remoteCopyExcludeDirectories`:
132
+
-`remoteCopyUseCompilerDefaults`:
133
+
130
134
-`rsyncCommandArgs`: specifies a set of additional command-line options passed to rsync.
131
135
-`remoteCopySourcesExclusionList`: A `array` that specifies a list of paths to be excluded when copying source files`: a path can be the name of a file/directory, or a path relative to root of the copy. Wildcards \\\"*\\\" and \\\"?\\\" can be used for glob pattern matching.
132
136
-`cmakeExecutable`: specifies the full path to the CMake program executable, including the file name and extension.
@@ -179,7 +183,7 @@ In `CMakeSettings.json`, you can define custom environment variables globally o
179
183
-`namespace`: names the environment so that its variables can be referenced from a configuration in the form `namespace.variable`. The default environment object is called `env` and is populated with certain system environment variables including `%USERPROFILE%`.
180
184
-`environment`: uniquely identifies this group of variables. Allows the group to be inherited later in an `inheritEnvironments` entry.
181
185
-`groupPriority`: An integer that specifies the priority of these variables when evaluating them. Higher number items are evaluated first.
182
-
-`inheritEnvironments`: An array of values that specify the set of environments that are inherited by this group. This feature enables you to inherit default environments and create custom environment variables that are passed to CMake.exe when it runs.
186
+
-`inheritEnvironments`: An array of values that specify the set of environments that are inherited by this group. This feature enables you to inherit default environments and create custom environment variables that are passed to CMake.exe when it runs. In Visual Studio 2019 version 16.4 and later, debug targets are automatically launched with the environment you specify in *CMakeSettings.json*.
183
187
184
188
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.
Copy file name to clipboardExpand all lines: docs/build/cppproperties-schema-reference.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,9 @@ When the Linux workload is installed, the following environments are available f
81
81
82
82
You can optionally use the `environments` property to define sets of variables in *CppProperties.json* either globally or per-configuration. These variables behave like environment variables in the context of an Open Folder project and can be accessed with the ${env.\<VARIABLE>} syntax from *tasks.vs.json* and *launch.vs.json* after they are defined here. However, they are not necessarily set as actual environment variables in any command prompt that Visual Studio uses internally.
83
83
84
-
When you consume an environment, then you have to specify it in the `inheritsEnvironments` property even if the environment is defined as part of the same configuration; the `environment` property specifies the name of the environment. The following example shows a sample configuration for enabling IntelliSense for GCC in an MSYS2 installation. Note how the configuration both defines and inherits the `mingw_64` environment, and how the `includePath` property can access the `INCLUDE` variable.
84
+
**Visual Studio 2019 version 16.4 and later:** Configuration-specific variables defined in *CppProperties.json* are automatically picked up by debug targets and tasks without the need to set `inheritEnvironments`. Debug targets are launched automatically with the environment you specify in *CppProperties.json*.
85
+
86
+
**Visual Studio 2019 version 16.3 and earlier:** When you consume an environment, then you have to specify it in the `inheritsEnvironments` property even if the environment is defined as part of the same configuration; the `environment` property specifies the name of the environment. The following example shows a sample configuration for enabling IntelliSense for GCC in an MSYS2 installation. Note how the configuration both defines and inherits the `mingw_64` environment, and how the `includePath` property can access the `INCLUDE` variable.
Copy file name to clipboardExpand all lines: docs/build/launch-vs-schema-reference-cpp.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ Use the *launch.vs.json* file to configure debugging parameters. To create the f
18
18
|`project`|string|Specifies the relative path to the project file.|
19
19
|`projectTarget`|string|Specifies the optional target invoked when building `project`. This `projectTarget` must exist already and match the name in the **Debug Target** dropdown.|
20
20
|`debugType`|string|Specifies the debugging mode according to the type of code (native, managed, or mixed). This will automatically be detected unless this parameter is set. Allowed values: "native", "managed", "mixed".|
21
-
|`inheritEnvironments`|array|Specifies a set of environment variables inherited from multiple sources. You can define some variables in files like CMakeSettings.json or CppProperties.json and make them available to debug context|
21
+
|`inheritEnvironments`|array|Specifies a set of environment variables inherited from multiple sources. You can define some variables in files like *CMakeSettings.json* or *CppProperties.json* and make them available to debug context|
22
22
|`args`|array|Specifies the command-line arguments passed to the launched program.|
23
23
|`currentDir`|string|Specifies the full directory path to the Build Target. This will automatically be detected unless this parameter is set.|
24
24
|`noDebug`|boolean|Specifies whether to debug the launched program. The default value for this parameter is `false` if not specified.|
0 commit comments