/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 3039 by caltinay, Tue Jun 15 07:21:56 2010 UTC revision 3096 by caltinay, Thu Aug 19 01:40:52 2010 UTC
# Line 156  adder( Line 156  adder(
156    ('silo_path', 'Path to Silo includes', '/usr/include'),    ('silo_path', 'Path to Silo includes', '/usr/include'),
157    ('silo_lib_path', 'Path to Silo libs', usr_lib),    ('silo_lib_path', 'Path to Silo libs', usr_lib),
158    ('silo_libs', 'Silo libraries to link with', ['siloh5', 'hdf5']),    ('silo_libs', 'Silo libraries to link with', ['siloh5', 'hdf5']),
159    # VisIt
160      BoolVariable('usevisit', 'switch on/off the usage of the VisIt sim library', 'no'),
161      ('visit_path', 'Path to VisIt libsim includes', '/usr/include'),
162      ('visit_lib_path', 'Path to VisIt sim library', usr_lib),
163  # AMD (used by UMFPACK)  # AMD (used by UMFPACK)
164    ('amd_path', 'Path to AMD includes', '/usr/include/suitesparse'),    ('amd_path', 'Path to AMD includes', '/usr/include/suitesparse'),
165    ('amd_lib_path', 'Path to AMD libs', usr_lib),    ('amd_lib_path', 'Path to AMD libs', usr_lib),
# Line 171  adder( Line 175  adder(
175    ('lapack_libs', 'Lapack libraries to link with', []),    ('lapack_libs', 'Lapack libraries to link with', []),
176    ('lapack_type', '{clapack,mkl}','clapack'),    ('lapack_type', '{clapack,mkl}','clapack'),
177  # An option for specifying the compiler tools set (see windows branch).  # An option for specifying the compiler tools set (see windows branch).
178    ('tools_names', 'allow control over the tools in the env setup', ['intelc']),    ('tools_names', 'allow control over the tools in the env setup', ['default']),
179  # finer control over library building, intel aggressive global optimisation  # finer control over library building, intel aggressive global optimisation
180  # works with dynamic libraries on windows.  # works with dynamic libraries on windows.
181    ('share_esysUtils', 'control static or dynamic esysUtils lib', False),    ('share_esysUtils', 'control static or dynamic esysUtils lib', False),
# Line 182  adder( Line 186  adder(
186  )  )
187    
188    
189    ###################
190    
191    # This is only to support old versions of scons which don't accept
192    # the variant_dir parameter (older than 0.98 I think).
193    # Once these are no longer an issue we can go back to a direct call
194    # to obj.SConscript
195    import SCons
196    vs=SCons.__version__.split('.')
197    cantusevariantdir=float(vs[0]+'.'+vs[1])<0.98
198    
199    
200    def CallSConscript(obj, **kw):
201        if cantusevariantdir:
202            if 'variant_dir' in kw:
203            kw['build_dir']=kw['variant_dir']
204            del kw['variant_dir']
205        obj.SConscript(**kw)
206    
207    
208  ############ Specify which compilers to use ####################  ############ Specify which compilers to use ####################
209    
# Line 193  if IS_WINDOWS_PLATFORM: Line 215  if IS_WINDOWS_PLATFORM:
215        env = Environment(tools = ['default'] + env['tools_names'],        env = Environment(tools = ['default'] + env['tools_names'],
216                          options = opts)                          options = opts)
217  else:  else:
218     if effective_hostname == 'savanna':     if os.uname()[4]=='ia64':
       env = Environment(tools = ['default', 'intelc'], options = opts)  
    elif os.uname()[4]=='ia64':  
219        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
220        if env['CXX'] == 'icpc':        if env['CXX'] == 'icpc':
221           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not)           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not)
222     else:     else:
223        env = Environment(tools = ['default'], options = opts)        env = Environment(tools = ['default'], options = opts)
224          if env['tools_names']!='default':
225        env=Environment(tools = ['default'] +env['tools_names'], options=opts)
226    
227  # Override compiler choice if provided  # Override compiler choice if provided
228  if env['cc'] != 'DEFAULT': env['CC']=env['cc']  if env['cc'] != 'DEFAULT': env['CC']=env['cc']
# Line 633  if env['usesilo']: Line 655  if env['usesilo']:
655    env.AppendUnique(CPPPATH = [env['silo_path']])    env.AppendUnique(CPPPATH = [env['silo_path']])
656    env.AppendUnique(LIBPATH = [env['silo_lib_path']])    env.AppendUnique(LIBPATH = [env['silo_lib_path']])
657    
658    ############ VisIt (optional) ###################################
659    
660    if env['usevisit']:
661      env.AppendUnique(CPPPATH = [env['visit_path']])
662      env.AppendUnique(LIBPATH = [env['visit_lib_path']])
663    
664  ########### Lapack (optional) ##################################  ########### Lapack (optional) ##################################
665    
666  if env['uselapack']:  if env['uselapack']:
# Line 755  if env['usenetcdf']: print "   Using NetCD Line 783  if env['usenetcdf']: print "   Using NetCD
783  else: print "   Not using NetCDF"  else: print "   Not using NetCDF"
784  if env['usevtk']: print "   Using VTK"  if env['usevtk']: print "   Using VTK"
785  else: print "   Not using VTK"  else: print "   Not using VTK"
786    if env['usevisit']: print " Using VisIt"
787    else: print "   Not using VisIt"
788  if env['usemkl']: print "   Using MKL"  if env['usemkl']: print "   Using MKL"
789  else: print "   Not using MKL"  else: print "   Not using MKL"
790  if env['useumfpack']: print "   Using UMFPACK"  if env['useumfpack']: print "   Using UMFPACK"
# Line 814  Export( Line 844  Export(
844     "clone_env",     "clone_env",
845     "dodgy_env",     "dodgy_env",
846     "IS_WINDOWS_PLATFORM",     "IS_WINDOWS_PLATFORM",
847     "TestGroups"     "TestGroups",
848       "CallSConscript",
849       "cantusevariantdir"
850     ]     ]
851    )    )
852    
853  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)  CallSConscript(env, dirs = ['tools/CppUnitTest/src'], variant_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
854  env.SConscript(dirs = ['tools/escriptconvert'], build_dir='build/$PLATFORM/tools/escriptconvert', duplicate=0)  CallSConscript(env, dirs = ['tools/escriptconvert'], variant_dir='build/$PLATFORM/tools/escriptconvert', duplicate=0)
855  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  CallSConscript(env, dirs = ['paso/src'], variant_dir='build/$PLATFORM/paso', duplicate=0)
856  env.SConscript(dirs = ['weipa/src'], build_dir='build/$PLATFORM/weipa', duplicate=0)  CallSConscript(env, dirs = ['weipa/src'], variant_dir='build/$PLATFORM/weipa', duplicate=0)
857  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)  CallSConscript(env, dirs = ['escript/src'], variant_dir='build/$PLATFORM/escript', duplicate=0)
858  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  CallSConscript(env, dirs = ['esysUtils/src'], variant_dir='build/$PLATFORM/esysUtils', duplicate=0)
859  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  CallSConscript(env, dirs = ['finley/src'], variant_dir='build/$PLATFORM/finley', duplicate=0)
860  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)  CallSConscript(env, dirs = ['modellib/py_src'], variant_dir='build/$PLATFORM/modellib', duplicate=0)
861  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  CallSConscript(env, dirs = ['doc'], variant_dir='build/$PLATFORM/doc', duplicate=0)
862  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)  CallSConscript(env, dirs = ['pyvisi/py_src'], variant_dir='build/$PLATFORM/pyvisi', duplicate=0)
863  env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)  CallSConscript(env, dirs = ['pycad/py_src'], variant_dir='build/$PLATFORM/pycad', duplicate=0)
864  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)  CallSConscript(env, dirs = ['pythonMPI/src'], variant_dir='build/$PLATFORM/pythonMPI', duplicate=0)
865  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)  CallSConscript(env, dirs = ['scripts'], variant_dir='build/$PLATFORM/scripts', duplicate=0)
866  env.SConscript(dirs = ['paso/profiling'], build_dir='build/$PLATFORM/paso/profiling', duplicate=0)  CallSConscript(env, dirs = ['paso/profiling'], variant_dir='build/$PLATFORM/paso/profiling', duplicate=0)
867    
868    
869  ############ Remember what optimizations we used ###############  ############ Remember what optimizations we used ###############
# Line 902  if env['usesilo']: Line 934  if env['usesilo']:
934     out+="y"     out+="y"
935  else:  else:
936     out+="n"     out+="n"
937    out+="\nusevisit="
938    if env['usevisit']:
939       out+="y"
940    else:
941       out+="n"
942  buildvars.write(out+"\n")  buildvars.write(out+"\n")
943  buildvars.close()  buildvars.close()
944    
# Line 921  env.Alias('install_paso', ['build_paso', Line 958  env.Alias('install_paso', ['build_paso',
958  env.Alias('build_weipa', ['target_install_weipa_headers', 'target_weipa_so', 'target_weipacpp_so'])  env.Alias('build_weipa', ['target_install_weipa_headers', 'target_weipa_so', 'target_weipacpp_so'])
959  env.Alias('install_weipa', ['build_weipa', 'target_install_weipa_so', 'target_install_weipacpp_so', 'target_install_weipa_py'])  env.Alias('install_weipa', ['build_weipa', 'target_install_weipa_so', 'target_install_weipacpp_so', 'target_install_weipa_py'])
960    
961    
962  env.Alias('build_escriptreader', ['target_install_weipa_headers', 'target_escriptreader_a'])  env.Alias('build_escriptreader', ['target_install_weipa_headers', 'target_escriptreader_a'])
963  env.Alias('install_escriptreader', ['build_escriptreader', 'target_install_escriptreader_a'])  env.Alias('install_escriptreader', ['build_escriptreader', 'target_install_escriptreader_a'])
964    

Legend:
Removed from v.3039  
changed lines
  Added in v.3096

  ViewVC Help
Powered by ViewVC 1.1.26