Overview
Sweet Build is a generic build tool. It consists of a single executable that provides a platform independent build environment and several Lua scripts that implement the C++ build system used at Sweet Software.
Sweet Build is similar to GNU Make, Boost Build, Perforce Jam, Scons, and other build tools. It differs by having a stronger separation between the specification of the dependency graph and the actions to take for each target in the graph. It does this by using a simple domain specific language to express the initial dependency graph and the Lua scripting language to express the actions to be taken for each target in the graph.
Features:
- Single executable with no external dependencies.
- Domain specific language to specify dependency graph.
- Lua scripting language to specify actions.
- Support for multiple directory builds.
- Platform independent path and file system operations.
- Scanning source files for regular expressions to generate dependencies.
- Filtering output for IDE support.
- Dependency graph save and load for faster incremental builds.
- Parallel execution to make use of multiple processors.
- Variant builds.
Anti-features:
- The tool has not seen widespread use and is still in beta.
GNU Make vs SCons vs Sweet Build
These are timing tests based on the tests run by Noel Llopis in his "The Quest for the Perfect Build System" blog entries (parts 1, 2, and 3). In the test 50 libraries with 100 classes each are built. Each source file includes 15 headers from its own library and 5 headers from other libraries.
The tests are run on an Intel Core2 Duo P8600 @2.4GHz, 4GB RAM, with a Samsung SSD RBX series 128GB hard drive.
| Tool | Full | Incremental | Single |
| GNU Make | 456.3s | 4.2s | 3.2s |
| SCons | 427.2s | 43.1s | 8.7s |
| Sweet Build | 135.4s | 1.8s | 1.6s |