/[escript]/temp/SConstruct
ViewVC logotype

Diff of /temp/SConstruct

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1024 by gross, Tue Mar 13 06:31:50 2007 UTC revision 1028 by gross, Wed Mar 14 00:15:24 2007 UTC
# Line 47  if os.path.isdir('/opt/UFconfig'): Line 47  if os.path.isdir('/opt/UFconfig'):
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
# Line 62  else: Line 70  else:
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(
# Line 83  opts.AddOptions( Line 94  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'),
# Line 118  opts.AddOptions( Line 129  opts.AddOptions(
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])),
# Line 149  opts.AddOptions( Line 160  opts.AddOptions(
160  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix  # FIXME: Perhaps a modification to intelc.py will allow better support for ia64 on altix
161    
162  if os.name != "nt" and os.uname()[4]=='ia64':  if os.name != "nt" and os.uname()[4]=='ia64':
163     env = Environment(ENV = {'PATH':path}, tools = ['default', 'intelc'], options = opts)     env = Environment(tools = ['default', 'intelc'], options = opts)
164     if env['CXX'] == 'icpc':     if env['CXX'] == 'icpc':
165        env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py        env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py
166  elif os.name == "nt":  elif os.name == "nt":
167     env = Environment(tools = ['default', 'intelc'], options = opts)     env = Environment(tools = ['default', 'msvc'], options = opts)
168  else:  else:
169     env = Environment(tools = ['default'], options = opts)     env = Environment(tools = ['default'], options = opts)
170  # Initialise Scons Build Environment  # Initialise Scons Build Environment

Legend:
Removed from v.1024  
changed lines
  Added in v.1028

  ViewVC Help
Powered by ViewVC 1.1.26