Skip to main content

C/C++ build tool

Project description

CSB (pronounced “cusp”) is a python makefile program that’s written to be both efficient and easy to use. Unlike GNU make, the syntax for csbuild is very simple and easy to approach, while still being powerful. No deep understanding of g++’s hundreds of flags is required.

Additionally, CSB is designed to prevent doing more work than necessary whenever possible. Rather than specifying every file you want to compile, you specify files and directories you DON’T want to compile, so adding a new file to your project is as easy as creating it. And when compiling, CSB checks the header files in each of your source files, recompiling every necessary source file when an included header changes, but leaving alone the files that the header can’t affect. Further, it keeps md5 records of source and header files within the project, so that it doesn’t recompile files if the modified date has changed but the contents haven’t.

CSB is also intelligently multi-threaded and will use threads for compilation to enable maximum efficiency based on the hardware of your machine.

One very big advantage imparted by CSB is the intelligent use of the “Unity Build” concept, in an implementation I call “chunked build.” With chunked builds, the project is divided into larger compilation units, created by joining multiple source files into a single file. This speeds up compilation considerably when doing full builds; however, where unity builds often fail is in iterative programming involving multiple sequential small changes to few files, in which case unity builds often end up building far more than is necessary.

To avoid this issue, CSB takes a sequential approach to building. When doing a full build, CSB uses the unity approach, combining small compilation units into larger ones to increase the build time. However, when doing incremental builds, CSB takes advantage of small builds to split these larger units back down into their base components. When a build only consists of a small number of files, CSB will discard the chunk those files are in if it exists, and compile them as individual files - then the next time any file in that chunk is compiled, only it will be compiled, rather than the entire chunk. The end result is a build that starts out with the unity approach, and gradually shifts back to a more traditional approach over time. (However, any time you need to build a sufficiently large number of files in a chunk, CSB will return to building the whole chunk - so when working with header files, or when changing many files at once, you may find that the build shifts back and forth between chunks and individual files to try and keep all builds to the minimum possible time.)

Finally, CSB combines “./configure” and “make” into one call, checking dependencies as part of its build process and alerting at the very start of the build if it can’t find a required library, rather than waiting until the linker is invoked to alert of this.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csbuild-0.92.0.tar.gz (145.8 kB view details)

Uploaded Source

File details

Details for the file csbuild-0.92.0.tar.gz.

File metadata

  • Download URL: csbuild-0.92.0.tar.gz
  • Upload date:
  • Size: 145.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for csbuild-0.92.0.tar.gz
Algorithm Hash digest
SHA256 9779897434612a1f7f78ea2b8192384ab76ed1a11d03d0198159d6dacfa7c58f
MD5 6ade6e081cd6954a0072e2fa996d7fca
BLAKE2b-256 825b1a2912debb61fb6073bb0276170ab3c2ab57086fa778a495823d489ee498

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page