Last active
November 2, 2017 20:33
-
-
Save Tomaszal/2b13ade96d47cd7d0bb4526c6b64efb6 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
{ | |
"selector": "source.cpp", | |
"file_patterns": ["*.cpp"], | |
"working_dir": "$file_path", | |
"shell": true, | |
"linux": | |
{ | |
"shell_cmd": "g++ $file_name -o ${file_base_name}.bin && echo | ./${file_base_name}.bin && echo \n" | |
}, | |
"windows": | |
{ | |
"shell_cmd": "g++ $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": "g++ $file_name -o ${file_base_name}.bin && cat in | ./${file_base_name}.bin > out && cat out && echo \n" | |
}, | |
"windows": | |
{ | |
"shell_cmd": "g++ $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
This is pretty much a mirror of my C build system, just for C++.