cpp.build

发布时间 2023-11-09 09:43:41作者: 颈流推进
{ 
    "shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'", 
    "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", 
    "working_dir": "${file_path}", 
    "selector": "source.c, source.c++", 
    "variants": 
    [ 
        { 
            "name": "Build & Run", 
            "shell_cmd": "x-terminal-emulator  -e bash -c \"g++ '${file}' -o '${file_path}/${file_base_name}' -std=c++14 -fsanitize=address,undefined -fno-ms-extensions -Wall; '${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\"" 
        },
        { 
            "name": "Build Only", 
            "shell_cmd": "g++ '${file}' -o '${file_path}/${file_base_name}'" 
        }, 
        { 
            "name": "Run Only", 
            "shell_cmd": "x-terminal-emulator  -e bash -c \"'${file_path}/${file_base_name}' ; read -p '\nPress ENTER or type command to continue...'\"" 
        }
    ] 
}