Skip to content

Instantly share code, notes, and snippets.

@sawaYch
Last active February 7, 2018 12:15
Show Gist options
  • Save sawaYch/3e72dee2aff53ecdaef235b8f4638323 to your computer and use it in GitHub Desktop.
Save sawaYch/3e72dee2aff53ecdaef235b8f4638323 to your computer and use it in GitHub Desktop.
c++ build system for windows 10 (MinGW) and execute on git-Bash.
{
"cmd": ["g++", "./*.cpp", "-o", "${file_base_name}.exe"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"variants":
[
{
"name": "Run(native)",
"cmd": ["git-bash", "-c", "./${file_base_name}.exe;echo -e '\\e[0;32m- press any key to continue -';read;"],
"shell": true
},
{
"name": "Compile(WSL)",
"cmd": ["open-wsl", "-c", "g++ -std=c++11 ./*.cpp -o ${file_base_name};echo -e '\\e[0;32mCompilation Finished.';read;"],
"shell": true
},
{
"name": "Run(WSL)",
"cmd": ["open-wsl", "-c", "./${file_base_name};echo -e '\\e[0;32m- press any key to continue -';read;"],
"shell": true
},
{
"name": "Valgrind(WSL)",
"cmd":["open-wsl", "-c", "valgrind --leak-check=full ./${file_base_name} | 2> out_err;echo -e '\\e[0;33mValgrind Report End';read;"],
"shell":true
},
{
"name": "Make(native)",
"cmd": ["git-bash", "-c", "mingw32-make.exe"],
"shell": true
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment