Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A type safe build system for C++ (something like SBT)

After using Scala's Simple Build Tool (SBT) and loving it, I'm working on a C++ project that makes extensive use of CMake. The CMake files are quite complicated, and it's painful to modify them, or to even understand them. In contrast, I've found SBT configs for even large projects to be readable, I think due to static typing and immutability.

Are there any efforts to bring SBT-style goodness to C++?

like image 547
emchristiansen Avatar asked Sep 12 '12 22:09

emchristiansen


1 Answers

With SCons you have the type safety of Python - therefore just a dynamic, run-time type safety. Anything else is dependent on your IDE (i.e., static code analysis). Therefore, I think SBT has its advantages because you have Scala's compile-time type safety.

But for C/C++ I think SCons is much better suited (I'm the author of SConsolidator - so I might be biased). It has built-in scanners to detect include dependencies and builders to generate object files, static and shared libraries - all things which SBT does not have at the moment - at least as far as I know.

like image 53
Michael Rueegg Avatar answered Nov 15 '22 20:11

Michael Rueegg