SCons | |
---|---|
![]() | |
Original author(s) | Steven Knight |
Initial release | December 13, 2001 [1] |
Stable release | 4.9.1 [2] / March 27, 2025 |
Repository | github |
Written in | Python |
Operating system | Cross-platform |
Type | Software development tools |
License | MIT License |
Website | scons |
SCons is a software development tool that analyzes source code dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is similar to the more popular GNU build system.
The tool generates Python scripts for project configuration and build logic.
The Cons software construction utility, written in the Perl, was created by Bob Sidebotham in 1999. [3] It served as a base for the ScCons build tool, a design which won the Software Carpentry project SC Build competition in August 2000. [4] ScCons was the foundation for SCons.
SCons inspired the creation of Waf, formerly known as SCons/BKsys, which emerged in the KDE community. For some time, there were plans to use it as the build tool for KDE 4 and beyond, but that effort was abandoned in favor of CMake. [5]
Notable projects that use SCons (or used it at one time) include: The Battle for Wesnoth, [6] Battlefield 1942,[ citation needed ] Doom 3, [7] gem5, [8] gpsd, [9] GtkRadiant, [10] Madagascar, [11] Nullsoft Scriptable Install System, [12] OpenNebula, [13] VMware,[ citation needed ], Wolfenstein: Enemy Territory, [14] XORP and MCA2, [15] openpilot [16] and Godot. [17]
.csig is the SCons Content Signature file format.
Major features include:
The following is an SConstruct file that builds a hello world C program using the default platform compiler:
Program("hello-world.c")
The following is a SConstruct file for a project that includes two source files and specifies build tool options:
env=Environment()env.Append(CPPFLAGS=["-Wall","-g"])env.Program("hello",["hello.c","main.c"])