/STBuild

An easy to use buildsystem for C/C++ with minimal dependencies targeting C/C++ beginners and projects with moderate complexity.

Primary LanguageC++MIT LicenseMIT

STBuild

What makes this build system different

Single file

The entire source code for this build system is inside a single .cpp for the following reasons:

  1. No other dependencies other than the std library (the embedded yaml parser) and a compiler of course. No need to install a third party build-system, Python etc.
  2. g++ stbuild.cpp yaml/Yaml.cpp --std=c++17 -o stbuild is all you need to compile this build system into an executable (well except for MSVC lol). This should make it easily portable to different platforms.

* Currently the yaml parser is not included in the stbuild.cpp, so the command is a little more involved at the moment (you have to include a second file), but this is an early prototype and will propably change in the future!

Traversial

You might give this build system a defined list of files, or some paths with regex expressions to declare which files you would like to build.

CMake and Make both need a list of source files, telling them to just look in a specified directory for files with a certain ending is just a nightmare (especially doing this cross platform with Make). Compiling a C/C++ program with multiple files as a newcomer to the language is just madness.

Build system

And the build description files should be straight forward. TODO

Why another build system?

Well there are plenty build systems out there. While some people are upset by the sheer abundance of build systems, others are mad at the current selection of build systems. They usually have a hell lot of dependences and require the most complex, unintuitive setup for the most basic tasks (I might write a list sometime to outline my fun experiences).

stb, this remembers me of something...

First of im not affiliated with Sean Barret (nothings) in any way. But yes the name STBuild was choosen on purpose. I just highly appreciate the librarys this guy realesed into the wild and the fact that they usually consist of a single c++ source file. And others seem to like these too, as there are other authors following this idea and they get actively promoted by Sean Barret.

Well if you never heard of Sean Berret and his work, it's a shame and you should definitively go check it out.