Skip to content

Instantly share code, notes, and snippets.

@jordanlui
Created June 15, 2017 12:39
Show Gist options
  • Save jordanlui/dcac52726a2880ce141016bb46f446f3 to your computer and use it in GitHub Desktop.
Save jordanlui/dcac52726a2880ce141016bb46f446f3 to your computer and use it in GitHub Desktop.
{
"cmd": ["g++", "-std=c++11", "-o", "${file_path}/${file_base_name}", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ '${file}' -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
},
{
"name": "Run with C++11",
"cmd": ["bash", "-c", "g++ '${file}' -std=c++11 -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"]
},
{
"name": "Build without C++11",
"cmd": ["g++ '${file}' -o '${file_path}/${file_base_name}'"]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment