Is there anyway to have Sublime Text 2 build all files in a project? I have a project that just has a few very simple C files in it, but by default, Sublime can only build one file at a time. The default C++ build rule is good at single file compiles, but that’s about it.
I know its build system is mostly designed around simply calling another build system, such as make, but I’d love if I didn’t have to deal with makefiles. I’d prefer if I could just have Sublime Text iterate over every file in my project and build them all with one rule. Is that at all possible?
Makefiles are definitely one of the better options here, but if you’d rather not, you could just make a new build system that does something similar.
To get you started, Go to Tools->Build System->New Build System…, and add the following:
Then save it in the default directory (
Packages/User/)This is a direct clone of the standard C++ build system, I’ve just modified the “single file” input argument to “all .cpp files in the current directory”.
Hope that’s a useful starting point!