Introduction
Navid has been busy setting up a demonstration environment using SCons and the ScienceTools v8r2.
Location of Installation
SCons is installed here at SLAC: /afs/slac/g/glast/applications/SCons/0.97/bin/scons
There's a copy of SciTools in Navid's area: /nfs/farm/g/glast/u06/golpa/ST-v8r2-scons/ScienceTools
If you desire to run SCons, please copy the ScienceTools from Navid's area into a place you have write-access.
Interesting Details
There is a top-level SConstruct file which contains configuration/build information to be used "globally". This includes options to include debug and optimization flags during compilation.
The virjpk subdirectories are not in place or assumed in this organization. There is a note out to Riccardo to check if that arrangement is acceptable to MRStudio.
Externals
Special file, SConstruct (a Python script fragment), contains
config/build info for each package
- use the "scons" command to invoke functionality (try "scons -h" for hints)
- system does not yet know about GLAST_EXT directory structure,
but Navid expect to add that support soon.
- dependencies put in by hand (for now)
Gory details of the SConstruct file
import os,platform scons [target] [compile options]
#########################
# Global Environment #
#########################
baseEnv = Environment();
if ARGUMENTS.get('debug',0):
baseEnv.Append(CCFLAGS = "-g")
if ARGUMENTS.get('optimized',0):
baseEnv.Append(CCFLAGS = "-O2")
if ARGUMENTS.get('CC',0):
baseEnv.Replace(CC = ARGUMENTS.get('CC'))
if ARGUMENTS.get('CXX',0):
baseEnv.Replace(CXX = ARGUMENTS.get('CXX'))
if ARGUMENTS.get('CCFLAGS',0):
baseEnv.Append(CCFLAGS = ARGUMENTS.get('CCFLAGS'))
if ARGUMENTS.get('CXXFLAGS',0):
baseEnv.Append(CXXFLAGS = ARGUMENTS.get('CXXFLAGS'))
helpString = """
Usage:
Targets:
Default: Build release binaries and libraries
test: Build test binaries and required libraries
binaries: Build release binaries and required libraries
libraries: Build all libraries
Compile Options:
Optimized: Set to 1 to compile with optimization. Default 0
.
CC: Set to the compiler to use for C source code.
CXX: Set to the compiler to use for C++ source code.
CCFLAGS: Set to additional flags passed to the C compiler
.
CXXFLAGS: Set to additional flags passed to the C++ compiler.
"""
Export('baseEnv')