{
"version": "2.0.0",
"options":
{
"cwd": "${workspaceFolder}/build"
},
"tasks": [
{
"label": "cmake",
"command": "cmake",
"args": [
"..",
"-G",
"Visual Studio 15 2017",
"-T",
"host=x64", // 编译主机的架构 x86 x64,默认 x86
"-A", "x64" // 目标的位数 win32 x64,默认 win32
]
},
{
"label": "build",
"command": "cmake",
"args": [
"--build",
".",
"--config",
"Debug" // Debug MinSizeRel RelWithDebInfo Release
],
"dependsOn":["cmake"]
}
]
}
lauch.json中添加 "preLaunchTask": "build"