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
Visual Studio provides two configurations by default: `x64-Debug`and `x86-Debug`. You can add additional configurations by clicking the green plus sign.The settings that you see in the editor might vary depending on which configuration is selected.
20
+
Visual Studio provides one `x64-Debug`configuration by default. You can add additional configurations by clicking the green plus sign.The settings that you see in the editor might vary depending on which configuration is selected.
21
21
22
22
The options that you choose in the editor are written to a file called CMakeSettings.json. This file provides command-line arguments and environment variables that are passed to CMake when you build the projects. Visual Studio never modifies CMakeLists.txt automatically; by using CMakeSettings.json you can customize the build through Visual Studio while leaving the CMake project files untouched so that others on your team can consume them with whatever tools they are using.
23
23
@@ -32,27 +32,27 @@ Corresponds to the **name** setting. This is the name that appears in the C++ co
32
32
33
33
### Configuration type
34
34
35
-
Corresponds to the **configurationType** setting. Defines the build configuration type for the selected generator. Currently supported values are "Debug", "MinSizeRel", "Release", and "RelWithDebInfo".
35
+
Corresponds to the **configurationType** setting. Defines the build configuration type for the selected generator. Currently supported values are "Debug", "MinSizeRel", "Release", and "RelWithDebInfo". This maps to [CMAKE_BUILD_TYPE](https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html).
36
36
37
37
### Toolset
38
38
39
39
Corresponds to the **inheritedEnvironments** setting. Defines the compiler environment that will be used to build the selected configuration. Supported values depend on the type of configuration. To create a custom environment, click the **Edit JSON** link in the upper right corner of the Settings editor and edit the CMakeSettings.json file directly.
40
40
41
41
### CMake toolchain file
42
42
43
-
Path to the CMake toolchain file. Will be passed to CMake as "-DCMAKE_TOOLCHAIN_FILE = \<filepath>".
43
+
Path to the [CMake toolchain file](https://cmake.org/cmake/help/latest/variable/CMAKE_TOOLCHAIN_FILE.html). Will be passed to CMake as "-DCMAKE_TOOLCHAIN_FILE = \<filepath>". Toolchain files specify locations of compilers and toolchain utilities, and other target platform and compiler related information. By default, Visual Studio will try and use the [vcpkg toolchain file](https://github.com/microsoft/vcpkg/blob/master/docs/examples/installing-and-using-packages.md#cmake) if this setting is unspecified.
44
44
45
45
### Build root
46
46
47
-
Corresponds to **buildRoot**. Maps to **-DCMAKE_BINARY_DIR** switch and specifies where the CMake cache will be created. If the folder does not exist, it is created.
47
+
Corresponds to **buildRoot**. Maps to [CMAKE_BINARY_DIR](https://cmake.org/cmake/help/v3.15/variable/CMAKE_BINARY_DIR.html)and specifies where the CMake cache will be created. The specified folder will be created if it does not exist.
48
48
49
49
## Command arguments
50
50
51
51
The following settings are available under the **Command arguments** heading:
52
52
53
53
### CMake command arguments
54
54
55
-
Corresponds to **cmakeCommandArgs**. Specifies any additional switches you want to pass to CMake.exe.
55
+
Corresponds to **cmakeCommandArgs**. Specifies any additional [command line options](https://cmake.org/cmake/help/latest/manual/cmake.1.html) passed to CMake.exe.
56
56
57
57
### Build command arguments
58
58
@@ -61,15 +61,15 @@ Corresponds to **buildCommandArgs**: specifies additional switches to pass to th
61
61
62
62
### CTest command arguments
63
63
64
-
Corresponds to**ctestCommandArgs**: specifies additional switches to pass to CTest when running tests.
64
+
Corresponds to**ctestCommandArgs**: specifies additional [command line options](https://cmake.org/cmake/help/v3.15/manual/ctest.1.html) to pass to CTest when running tests.
65
65
66
66
## General settings for remote builds
67
67
68
68
For configurations such as Linux that use remote builds, the following settings are also available:
69
69
70
70
### rsync command arguments
71
71
72
-
Provide any command arguments to be passed to rsync.
72
+
Additional command line options passed to [rsync](https://download.samba.org/pub/rsync/rsync.html), a fast and versatile file-copying tool.
73
73
74
74
## CMake variables and cache
75
75
@@ -81,7 +81,7 @@ Corresponds to **variables**: contains a name-value pair of CMake variables that
81
81
82
82
### CMake generator
83
83
84
-
Corresponds to **generator**: maps to the CMake **-G** switch and specifies the generator to be used. This property can also be used as a macro, `${generator}`, when composing other property values. Visual Studio currently supports the following CMake generators:
84
+
Corresponds to **generator**: maps to the CMake **-G** switch and specifies the [CMake generator](https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html) to be used. This property can also be used as a macro, `${generator}`, when composing other property values. Visual Studio currently supports the following CMake generators:
85
85
86
86
- "Ninja"
87
87
- "Unix Makefiles"
@@ -95,19 +95,19 @@ Corresponds to **generator**: maps to the CMake **-G** switch and specifies the
95
95
- "Visual Studio 14 2015 Win64"
96
96
- "Visual Studio 14 2015 ARM"
97
97
98
-
Because Ninja is designed for fast build speeds instead of flexibility and function, it is set as the default. However, some CMake projects may be unable to correctly build using Ninja. If this occurs, you can instruct CMake to generate a Visual Studio project instead.
98
+
Because Ninja is designed for fast build speeds instead of flexibility and function, it is set as the default. However, some CMake projects may be unable to correctly build using Ninja. If this occurs, you can instruct CMake to generate a Visual Studio project instead.
99
99
100
100
### IntelliSense mode
101
101
102
-
For accurate IntelliSense, set this to the appropriate value for your project.
102
+
The IntelliSense mode used by the IntelliSense engine. If no mode is selected then Visual Studio will inherit from the specified toolset.
103
103
104
104
### Install directory
105
105
106
-
The directory in which CMake installs the targets that it builds.
106
+
The directory in which CMake installs targets. Maps to [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
107
107
108
108
### CMake executable
109
109
110
-
The full path to the CMake executable, including file name and extension. For remote builds, specify the CMake location on the remote machine.
110
+
The full path to the CMake program executable, including the file name and extension. This allows you to use a custom version of CMake with Visual Studio. For remote builds, specify the CMake location on the remote machine.
111
111
112
112
For configurations such as Linux that use remote builds, the following settings are also available:
113
113
@@ -117,7 +117,7 @@ The directory on the remote machine that contains the root CMakeLists.txt file.
117
117
118
118
### Remote install root
119
119
120
-
The directory on the remote machine in which CMake installs targets.
120
+
The directory on the remote machine in which CMake installs targets. Maps to [CMAKE_INSTALL_PREFIX](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
0 commit comments