You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

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

Each release consists of a number of packages with a specific version number.  The release itself has its own version number.  When a user creates their own release and package within this release, the modules they build will be a mix of code in their release directory, as well as libraries from the system release directory.  As new releases are added to the system, the SconsTools package (which scons invokes) must maintain consistency between the code in the local user release directory, and the system release.  To upgrade the version of a release, see Typical development tasks.

The release directory will have a SConscript file, as will each package subdiretory.  The structure of a release directory is explained in this page about Packages and Releases. Run scons from the release directory. The top level SConscript file is responsible for building and installing software in each package directory. Software is installed in the release/arch subdirectory.

External Libraries and Scons Build Customization


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.

  • No labels