Introduction
LUSI DMG build system is based on SCons. It is implemented as a set of scripts, main SConstruct
script in the top release directory, one SConscript
file in each of the packages in the release, and set of scripts in SConsTools
package. Below is the description of the various parts of this system and basic procedures.
Release setup
to be completed
External Libraries and Scons Build Customization
scons_custom_build
Most packages require no additional options beyond those in the default configuration. If a package requires additional build options, these can often be added by calling the standardSConscript()
function in the SConscript file in the package directory. For instance, suppose a psana user is developing a module in a package called MyPackage
which needs to use functions from the Gnu Scientific Library. They would add the following line:
standardSConscript(LIBS='gsl gslcblas')
To the file MyPackage/SConscript
. Here is a complete list of options you can set with standardSConscipt()
:
LIBS - list of additional libraries needed by this package LIBPATH - list of directories for additional libraries BINS - dictionary of executables and their corresponding source files TESTS - dictionary of test applications and their corresponding source files SCRIPTS - list of scripts in app/ directory UTESTS - names of the unit tests to run, if not given then all tests are unit tests PYEXTMOD - name of the Python extension module, package name used by default CCFLAGS - additional flags passed to C/C++ compilers NEED_QT - set to True to enable Qt support
Note: when updating the SConscript file in your package directory, these options will apply to all targets built in your package. Likewise when updating the SConscript file in your release directory, these options will apply to all targets in all packages.