Vscode C/C++tasks.json

2399 단어 vscode
{
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build",
            "command": "g++",
            "args": [
                "-g",
                "-Wall",
                "-std=c++11",
                "-lm",
                "${file}",
                "-o"
            ],
            "windows": {
                "args": [
                    "${fileDirname}/${fileBasenameNoExtension}.exe"
                ]
            },
            "linux": {
                "args": [
                    "${fileDirname}/${fileBasenameNoExtension}.o"
                ]
            },
            "osx": {
                "args": [
                    "${fileDirname}/${fileBasenameNoExtension}.o"
                ]
            },
            "presentation": {
                "reveal": "always",
                "echo": false,
                "focus": true
            },
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": "absolute",
                "pattern": {
                    "regexp": "^(.*):(\\d+):(\\d+):\\s+(error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                }
            }
        },

        {
            "label": "Run",
            "type": "shell",
            "dependsOn": "Build",
            "command": "${fileDirname}/${fileBasenameNoExtension}.o",
            "windows": {
                "command": "${fileDirname}/${fileBasenameNoExtension}.exe"
            },
            "args": [],
            "presentation": {
                "reveal": "always",
                "focus": true
            },
            "problemMatcher": [],
            "group": {
                "kind": "test",
                "isDefault": true
            }
        }
    ]
}

좋은 웹페이지 즐겨찾기