scons - build system (vs cmake)

29 views
Skip to first unread message

Doug

unread,
Sep 15, 2016, 9:20:00 AM9/15/16
to opene...@googlegroups.com

For a few years now I've thought openeaagles should move to cmake as its goto tool for creating a build system.  CMake is obviously popular as it's used by many projects - I see it overtaking 'autoconf' soon.  But after taken a look at scons these past few days, my view might have been shaken. SCons is written in python, and uses python scripts to guide the build process - a wonderful use of an existing general purpose language tailored to a particular problem, much like the premake effort (which uses Lua) - I'm really impressed.

CMake is a software tool that needs to be installed on your system to use it.  It defines it's own scripting language in which to describe the structure of your project, and from that, can generate visual studio and/or 'make' Makefiles to actually compile it.  The biggest positive I see with cmake is its popularity; the biggest negative with cmake is its invention of a strange, somewhat ugly scripting language to describe your project.  It also appears to be chained to the past - meaning, instead of just getting better (which it does by adding features to its language), it tries hard to support every feature (i.e., command) that has existed before, which leads to a confusing mess of 'what's the right way to do this or that, now.'  Being 'compatible' is not what it's all cracked up to be - it can make things confusing for the 'newbie' that is trying to learn how to do things the most efficient and correct way.

As for scons, it assumes one thing - you have python 2.x installed on your computer.  After that, scons, being a bunch of python scripts (i.e., a package) provides the features needed to write a build script for your project.  This is very appealing from my standpoint, as I'd rather sharpen my python programming skills as opposed to 'off the beaten path' cmake scripting programming skills.  The world sort of 'opens up' with scons, as you can almost do anything.  The biggest negative might be its market share in this domain.

So, I'm using both and learning....

I've created cmake files (in a different git branch) for oe, but not the examples.  I'll probably be doing the same for scons soon.

That is my ramblings for today....
Doug

Reply all
Reply to author
Forward
0 new messages