Getting Sublime Text to build a C++ file.
This builds single C++ files in Sublime Text, handy for testing small things.
Thanks to adnansky for Linux Test and Shell update.
{
"cmd": ["g++ -Wall ${file} -o ${file_base_name} && ./${file_base_name}"], "working_dir": "${file_path}",
"selector": "source.c++",
"shell": true,
"windows":
{
"cmd": ["cl", "/Fo${file_path}", "/O2", "$file"],
"selector": "source.c++",
"shell": true
}
}
{
"cmd": ["g++", "$file", "-o", "$file_base_name", "-I/usr/local/include"],
"selector": "source.c++",
"windows":
{
"cmd": ["cl", "/Fo${file_path}", "/O2", "$file"]
}
}