/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 2012 by phornby, Mon Nov 10 12:13:45 2008 UTC
# Line 37  prefix = ARGUMENTS.get('prefix', Dir('#. Line 37  prefix = ARGUMENTS.get('prefix', Dir('#.
37  hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])  hostname = re.sub("[^0-9a-zA-Z]", "_", socket.gethostname().split('.')[0])
38  tmp = os.path.join("scons",hostname+"_options.py")  tmp = os.path.join("scons",hostname+"_options.py")
39  options_file = ARGUMENTS.get('options_file', tmp)  options_file = ARGUMENTS.get('options_file', tmp)
40  if not os.path.isfile(options_file): options_file = False  if not os.path.isfile(options_file):
41  else: print "Options file is", options_file    options_file = False
42      print "Options file not found (expected '%s')" % tmp
43    else:
44      print "Options file is", options_file
45    
46  # Load options file and command-line arguments  # Load options file and command-line arguments
47  opts = Options(options_file, ARGUMENTS)  opts = Options(options_file, ARGUMENTS)
# Line 57  opts.AddOptions( Line 60  opts.AddOptions(
60    BoolOption('usedebug', 'Do you want a debug build?', 'no'),    BoolOption('usedebug', 'Do you want a debug build?', 'no'),
61    BoolOption('usevtk', 'Do you want to use VTK?', 'yes'),    BoolOption('usevtk', 'Do you want to use VTK?', 'yes'),
62    ('options_file', 'File of paths/options. Default: scons/<hostname>_options.py', options_file),    ('options_file', 'File of paths/options. Default: scons/<hostname>_options.py', options_file),
63      ('win_cc_name', 'windows C compiler name if needed', 'msvc'),
64    # The strings -DDEFAULT_ get replaced by scons/<hostname>_options.py or by defaults below    # The strings -DDEFAULT_ get replaced by scons/<hostname>_options.py or by defaults below
65    ('cc_flags', 'C compiler flags to use', '-DEFAULT_1'),    ('cc_flags', 'C compiler flags to use', '-DEFAULT_1'),
66    ('cc_optim', 'C compiler optimization flags to use', '-DEFAULT_2'),    ('cc_optim', 'C compiler optimization flags to use', '-DEFAULT_2'),
# Line 121  opts.AddOptions( Line 125  opts.AddOptions(
125  # BLAS (used by UMFPACK)  # BLAS (used by UMFPACK)
126    ('blas_path', 'Path to BLAS includes', '/usr/include/suitesparse'),    ('blas_path', 'Path to BLAS includes', '/usr/include/suitesparse'),
127    ('blas_lib_path', 'Path to BLAS libs', usr_lib),    ('blas_lib_path', 'Path to BLAS libs', usr_lib),
128    ('blas_libs', 'BLAS libraries to link with', ['blas'])    ('blas_libs', 'BLAS libraries to link with', ['blas']),
129    # An option for specifying the compiler tools set (see windows branch).
130      ('tools_names', 'allow control over the tools in the env setup', ['intelc'])
131  )  )
132    
133  ############ Specify which compilers to use ####################  ############ Specify which compilers to use ####################
# Line 130  opts.AddOptions( Line 136  opts.AddOptions(
136  # failing to find the compilers.  This warning can be safely ignored.  # failing to find the compilers.  This warning can be safely ignored.
137    
138  if IS_WINDOWS_PLATFORM:  if IS_WINDOWS_PLATFORM:
139        env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(options = opts)
140          env = Environment(tools = ['default'] + env['tools_names'],
141                            options = opts)
142  else:  else:
143     if socket.gethostname().split('.')[0] == 'service0':     if socket.gethostname().split('.')[0] == 'service0':
144        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
# Line 178  elif env["CC"] == "cl": Line 186  elif env["CC"] == "cl":
186    omp_debug     = ""    omp_debug     = ""
187    omp_libs      = []    omp_libs      = []
188    pedantic      = ""    pedantic      = ""
189    elif env["CC"] == "icl":
190      # intel C on Windows, see windows_msvc71_options.py for a start
191      pedantic      = ""
192    
193  # If not specified in hostname_options.py then set them here  # If not specified in hostname_options.py then set them here
194  if env["cc_flags"]  == "-DEFAULT_1": env['cc_flags'] = cc_flags  if env["cc_flags"]  == "-DEFAULT_1": env['cc_flags'] = cc_flags

Legend:
Removed from v.1811  
changed lines
  Added in v.2012

  ViewVC Help
Powered by ViewVC 1.1.26