Last active
January 31, 2022 02:49
-
-
Save mottosso/c462d678bb3bf799c9fb to your computer and use it in GitHub Desktop.
Sublime Build System for Clang
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// Build System for Sublime Text 3 to compile C using Clang. | |
// | |
// Usage: | |
// Compile and run via CTRL-b or F7 | |
// Compile with CTRL-SHIFT-b | |
// | |
// Pre-requisities: | |
// - A Unix-like OS (for bash) | |
// - clang must be available on your PATH | |
// | |
{ | |
"cmd": ["bash", "-c", "clang '${file}' -Wall -o '${file_path}/${file_base_name}' && '${file_path}/${file_base_name}'"], | |
"selector": "source.c", | |
"shell": false, | |
"working_dir": "$file_path", | |
"variants": [ | |
{ | |
"name": "Run", | |
"cmd": ["clang", "$file", "-o", "${file_base_name}", "-Wall"] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment