47 |
else: |
else: |
48 |
ufc_path_default=None |
ufc_path_default=None |
49 |
|
|
50 |
|
if os.path.isdir('/usr/local/include') and os.path.isdir('/usr/local/lib'): |
51 |
|
netCDF_path_default='/usr/local/include' |
52 |
|
netCDF_lib_path_default='/usr/local/lib' |
53 |
|
netCDF_libs_cxx_default=[ 'netcdf_c++', 'netcdf'] |
54 |
|
else: |
55 |
|
netCDF_path_default=None |
56 |
|
netCDF_lib_path_default=None |
57 |
|
netCDF_libs_cxx_default=None |
58 |
# Default options and options help text |
# Default options and options help text |
59 |
# These are defaults and can be overridden using command line arguments or an options file. |
# These are defaults and can be overridden using command line arguments or an options file. |
60 |
# if the options_file or ARGUMENTS do not exist then the ones listed as default here are used |
# if the options_file or ARGUMENTS do not exist then the ones listed as default here are used |
70 |
else: |
else: |
71 |
hostname+="_" |
hostname+="_" |
72 |
options_file = "scons/"+hostname+"_options.py" |
options_file = "scons/"+hostname+"_options.py" |
73 |
print "option file is ",options_file |
if os.path.isfile(options_file): |
74 |
|
print "option file is ",options_file,"." |
75 |
|
else: |
76 |
|
print "option file is ",options_file, "(not present)." |
77 |
|
|
78 |
opts = Options(options_file, ARGUMENTS) |
opts = Options(options_file, ARGUMENTS) |
79 |
opts.AddOptions( |
opts.AddOptions( |
94 |
BoolOption('dodebug', 'Do you want a debug build?', 'no'), |
BoolOption('dodebug', 'Do you want a debug build?', 'no'), |
95 |
('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file), |
('options_file', "Optional file containing preferred options. Ignored if it doesn't exist (default: scons/hostname_options.py)", options_file), |
96 |
('cc_defines','C/C++ defines to use', None), |
('cc_defines','C/C++ defines to use', None), |
97 |
('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas'), |
('cc_flags','C compiler flags to use (Release build)', '-O3 -std=c99 -ffast-math -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'), |
98 |
('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'), |
('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas -ansi -pedantic-errors'), |
99 |
('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'), |
('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'), |
100 |
('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'), |
('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'), |
101 |
('cc_flags_MPI','C compiler flags to use (Release MPI build)', '-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias -fno-alias -c99 -w1 -fpic -wd161'), |
('cc_flags_MPI','C compiler flags to use (Release MPI build)', '-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias -fno-alias -c99 -w1 -fpic -wd161'), |
129 |
('blas_libs', 'BLAS libraries to link with', None), |
('blas_libs', 'BLAS libraries to link with', None), |
130 |
# netCDF |
# netCDF |
131 |
('useNetCDF', 'switch on/off the usage of netCDF', 'yes'), |
('useNetCDF', 'switch on/off the usage of netCDF', 'yes'), |
132 |
PathOption('netCDF_path', 'Path to netCDF includes', '/usr/local/include'), |
PathOption('netCDF_path', 'Path to netCDF includes', netCDF_path_default), |
133 |
PathOption('netCDF_lib_path', 'Path to netCDF libs', '/usr/local/lib'), |
PathOption('netCDF_lib_path', 'Path to netCDF libs', netCDF_lib_path_default), |
134 |
('netCDF_libs_cxx', 'netCDF C++ libraries to link with', [ 'netcdf_c++', 'netcdf'] ), |
('netCDF_libs_cxx', 'netCDF C++ libraries to link with', netCDF_libs_cxx_default), |
135 |
# Python |
# Python |
136 |
# locations of include files for python |
# locations of include files for python |
137 |
PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])), |
PathOption('python_path', 'Path to Python includes', '/usr/include/python%s.%s'%(sys.version_info[0],sys.version_info[1])), |