/[escript]/branches/diaplayground/SConstruct
ViewVC logotype

Diff of /branches/diaplayground/SConstruct

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

revision 1789 by phornby, Mon Sep 15 08:34:44 2008 UTC revision 1930 by phornby, Fri Oct 24 09:35:55 2008 UTC
# Line 1  Line 1 
1  #         Copyright 2006 by ACcESS MNRF  
2    ########################################################
3    #
4    # Copyright (c) 2003-2008 by University of Queensland
5    # Earth Systems Science Computational Center (ESSCC)
6    # http://www.uq.edu.au/esscc
7    #
8    # Primary Business: Queensland, Australia
9    # Licensed under the Open Software License version 3.0
10    # http://www.opensource.org/licenses/osl-3.0.php
11  #  #
12  #              http://www.access.edu.au  ########################################################
13  #       Primary Business: Queensland, Australia  
 #  Licensed under the Open Software License version 3.0  
 #     http://www.opensource.org/licenses/osl-3.0.php  
14    
15  EnsureSConsVersion(0,96,91)  EnsureSConsVersion(0,96,91)
16  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
# Line 30  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 50  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 124  opts.AddOptions( Line 135  opts.AddOptions(
135    
136  if IS_WINDOWS_PLATFORM:  if IS_WINDOWS_PLATFORM:
137        env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(tools = ['default', 'msvc'], options = opts)
138          #env = Environment(tools = ['default', 'intelc'], options = opts)
139  else:  else:
140     if socket.gethostname().split('.')[0] == 'service0':     if socket.gethostname().split('.')[0] == 'service0':
141        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
# Line 148  if env["CC"] == "icc": Line 160  if env["CC"] == "icc":
160    # Intel compilers    # Intel compilers
161    cc_flags      = "-fPIC -ansi -wd161 -w1 -vec-report0 -DBLOCKTIMER -DCORE_ID1"    cc_flags      = "-fPIC -ansi -wd161 -w1 -vec-report0 -DBLOCKTIMER -DCORE_ID1"
162    cc_optim      = "-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias"    cc_optim      = "-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias"
163    cc_debug      = "-g -O0 -UDOASSERT -DDOPROF -DBOUNDS_CHECK"    cc_debug      = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK"
164    omp_optim     = "-openmp -openmp_report0"    omp_optim     = "-openmp -openmp_report0"
165    omp_debug     = "-openmp -openmp_report0"    omp_debug     = "-openmp -openmp_report0"
166    omp_libs      = ['guide', 'pthread']    omp_libs      = ['guide', 'pthread']
# Line 157  elif env["CC"] == "gcc": Line 169  elif env["CC"] == "gcc":
169    # GNU C on any system    # GNU C on any system
170    cc_flags      = "-fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER"    cc_flags      = "-fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER"
171    cc_optim      = "-O3"    cc_optim      = "-O3"
172    cc_debug      = "-g -O0 -UDOASSERT -DDOPROF -DBOUNDS_CHECK"    cc_debug      = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK"
173    omp_optim     = ""    omp_optim     = ""
174    omp_debug     = ""    omp_debug     = ""
175    omp_libs      = []    omp_libs      = []
# Line 171  elif env["CC"] == "cl": Line 183  elif env["CC"] == "cl":
183    omp_debug     = ""    omp_debug     = ""
184    omp_libs      = []    omp_libs      = []
185    pedantic      = ""    pedantic      = ""
186    elif env["CC"] == "icl":
187      # intel C on Windows, see windows_msvc71_options.py for a start
188      pedantic      = ""
189    
190  # If not specified in hostname_options.py then set them here  # If not specified in hostname_options.py then set them here
191  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.1789  
changed lines
  Added in v.1930

  ViewVC Help
Powered by ViewVC 1.1.26