cmake管理debug release tasks.json

cmake 管理debug release - 知乎

{
    "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": "make",
            "command": "cmake",
            "args": [
                "--build",
                ".",
                "--config",
                "Debug" // Debug  MinSizeRel  RelWithDebInfo  Release
            ],
            "dependsOn":["cmake"]
        },
        {
            "label": "build",
            "dependsOn": [
                "make"
            ]
        }
    ]
}

你可能感兴趣的:(C++,c++,vscode)