Last active
November 2, 2017 17:08
-
-
Save Tomaszal/556f030dfdceb035ca40e084975090a3 to your computer and use it in GitHub Desktop.
My C Sublime build system config. Prints results in Sublime's shell. Has an option to capture standard streams (pipes contents of file "in" to stdin & pipes stdout to file "out").
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
{ | |
"selector": "source.c", | |
"file_patterns": ["*.c"], | |
"working_dir": "$file_path", | |
"shell": true, | |
"linux": | |
{ | |
"shell_cmd": "gcc $file_name -o ${file_base_name}.bin && echo | ./${file_base_name}.bin && echo \n" | |
}, | |
"windows": | |
{ | |
"shell_cmd": "gcc $file_name -o ${file_base_name}.exe && echo | ${file_base_name}.exe && echo.", | |
"env": | |
{ | |
"PATH": "C:/MinGW/bin" | |
} | |
}, | |
"variants": | |
[ | |
{ | |
"name": "Capture standard streams (stdin & stdout)", | |
"linux": | |
{ | |
"shell_cmd": "gcc $file_name -o ${file_base_name}.bin && cat in | ./${file_base_name}.bin > out && cat out && echo \n" | |
}, | |
"windows": | |
{ | |
"shell_cmd": "gcc $file_name -o ${file_base_name}.exe && type in | ${file_base_name}.exe > out && type out && echo.", | |
"env": | |
{ | |
"PATH": "C:/MinGW/bin" | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment