I'd like to automatically run c++ using Sublime Text 3 build system:
It works when I manually set the build system:
> Tools > Build System > C++11
What should I be changing to be able to set,
> Tools > Build System > Automatic
and run C++11?
C++11.build-system
{
"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++",
"quiet": true,
"variants":
[
{
"name": "Run",
"cmd": ["bash", "-c", "g++ '${file}' -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}'"]
}
]
}
Aucun commentaire:
Enregistrer un commentaire