1 |
# Scons configuration file for DataBlocks2D unit tests |
# Scons configuration file for DataBlocks2D unit tests |
2 |
|
esysroot=str(Dir('./../../../..').abspath) |
3 |
import os |
execfile(str(File(esysroot+"/scons/esys_options.py"))) |
4 |
import sys |
|
|
|
|
|
# |
|
|
# ensure correct versions of python and scons |
|
|
|
|
|
EnsurePythonVersion(2,3) |
|
|
EnsureSConsVersion(0,96) |
|
|
|
|
|
# |
|
|
# set appropriate defaults for configuration variables |
|
|
|
|
|
esysroot = Dir('#../../..') |
|
|
usegcc = 0 |
|
|
options = None |
|
|
sys_libs = [] |
|
|
|
|
|
# |
|
|
# import configuration variables passed in from |
|
|
# calling SConscript (if any) |
|
|
|
|
|
Import('*') |
|
|
|
|
|
# |
|
|
# retreive command-line arguments if any |
|
|
|
|
|
if ARGUMENTS.get('usegcc',0): |
|
|
usegcc = 1 |
|
|
|
|
|
if ARGUMENTS.get('options',0): |
|
|
options = ARGUMENTS.get('options',0) |
|
|
|
|
|
# |
|
|
# determine platform |
|
|
|
|
|
env = Environment(ENV = os.environ) |
|
|
platform = env['PLATFORM'] |
|
|
|
|
|
# |
|
|
# determine hostname |
|
|
|
|
|
import socket |
|
|
hostname = socket.gethostname() |
|
|
|
|
|
# |
|
|
# load configuration settings |
|
|
|
|
|
options_dir = str(esysroot) + '/scons' |
|
|
sys.path.append(options_dir) |
|
|
|
|
|
from default_options import * |
|
|
|
|
|
if hostname=='ess': |
|
|
from ess_options import * |
|
|
|
|
|
if usegcc==1: |
|
|
from gcc_options import * |
|
|
|
|
|
if options!=None: |
|
|
exec "from " + options + " import *" |
|
|
|
|
5 |
cxx_flags=cxx_flags_debug |
cxx_flags=cxx_flags_debug |
6 |
|
|
|
# |
|
|
# print out build configuration for this module |
|
|
|
|
7 |
print "Build configuration for module: DataBlocks2D unit tests" |
print "Build configuration for module: DataBlocks2D unit tests" |
|
print " dodebug: 1" |
|
|
print " usegcc: ", usegcc |
|
8 |
print " cxx: ", cxx |
print " cxx: ", cxx |
9 |
print " platform: ", platform |
print " cxx_flags: ", cxx_flags |
|
print " hostname: ", hostname |
|
10 |
|
|
11 |
# |
# |
12 |
# do the actual build |
# do the actual build |
52 |
|
|
53 |
target = 'DataBlocks2DTest.exe' |
target = 'DataBlocks2DTest.exe' |
54 |
|
|
55 |
|
import os |
56 |
datablocks2d_env = Environment(ENV = os.environ) |
datablocks2d_env = Environment(ENV = os.environ) |
57 |
|
|
58 |
datablocks2d_env.Replace(CXX = cxx) |
datablocks2d_env.Replace(CXX = cxx) |