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

Diff of /branches/diaplayground/SConstruct

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

revision 3604 by caltinay, Mon Sep 19 04:47:53 2011 UTC revision 3784 by caltinay, Wed Jan 25 01:31:42 2012 UTC
# Line 47  if not os.path.isfile(options_file): Line 47  if not os.path.isfile(options_file):
47  ############################### Build options ################################  ############################### Build options ################################
48    
49  default_prefix='/usr'  default_prefix='/usr'
50  mpi_flavours=('none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')  mpi_flavours=('no', 'none', 'MPT', 'MPICH', 'MPICH2', 'OPENMPI', 'INTELMPI')
51  lapack_flavours=('none', 'clapack', 'mkl')  lapack_flavours=('none', 'clapack', 'mkl')
52    
53  vars = Variables(options_file, ARGUMENTS)  vars = Variables(options_file, ARGUMENTS)
# Line 125  vars.AddVariables( Line 125  vars.AddVariables(
125    ('build_shared', 'Build dynamic libraries only', False),    ('build_shared', 'Build dynamic libraries only', False),
126    ('sys_libs', 'Extra libraries to link with', []),    ('sys_libs', 'Extra libraries to link with', []),
127    ('escript_opts_version', 'Version of options file (do not specify on command line)'),    ('escript_opts_version', 'Version of options file (do not specify on command line)'),
128      ('SVN_VERSION', 'Do not use from options file', -2),
129  )  )
130    
131  ##################### Create environment and help text #######################  ##################### Create environment and help text #######################
# Line 283  env.Append(CCFLAGS = env['cc_flags']) Line 284  env.Append(CCFLAGS = env['cc_flags'])
284  # add system libraries  # add system libraries
285  env.AppendUnique(LIBS = env['sys_libs'])  env.AppendUnique(LIBS = env['sys_libs'])
286    
287  # Get the global Subversion revision number for the getVersion() method  
288  try:  global_revision=ARGUMENTS.get('SVN_VERSION', None)
289    if global_revision:
290        global_revision = re.sub(':.*', '', global_revision)
291        global_revision = re.sub('[^0-9]', '', global_revision)
292        if global_revision == '': global_revision='-2'
293    else:
294      # Get the global Subversion revision number for the getVersion() method
295      try:
296      global_revision = os.popen('svnversion -n .').read()      global_revision = os.popen('svnversion -n .').read()
297      global_revision = re.sub(':.*', '', global_revision)      global_revision = re.sub(':.*', '', global_revision)
298      global_revision = re.sub('[^0-9]', '', global_revision)      global_revision = re.sub('[^0-9]', '', global_revision)
299      if global_revision == '': global_revision='-2'      if global_revision == '': global_revision='-2'
300  except:    except:
301      global_revision = '-1'      global_revision = '-1'
302  env['svn_revision']=global_revision  env['svn_revision']=global_revision
303  env.Append(CPPDEFINES=['SVN_VERSION='+global_revision])  env.Append(CPPDEFINES=['SVN_VERSION='+global_revision])
# Line 413  if not conf.CheckFunc('Py_Exit'): Line 421  if not conf.CheckFunc('Py_Exit'):
421      print("Cannot find python library method Py_Main (tried %s in directory %s)" % (python_libs, python_lib_path))      print("Cannot find python library method Py_Main (tried %s in directory %s)" % (python_libs, python_lib_path))
422      Exit(1)      Exit(1)
423    
424    # reuse conf to check for numpy header (optional)
425    if conf.CheckCXXHeader(['Python.h','numpy/ndarrayobject.h']):
426        conf.env.Append(CPPDEFINES = ['HAVE_NUMPY_H'])
427        conf.env['numpy_h']=True
428    else:
429        conf.env['numpy_h']=False
430    
431  # Commit changes to environment  # Commit changes to environment
432  env = conf.Finish()  env = conf.Finish()
433    
# Line 557  if env['visit']: Line 572  if env['visit']:
572    
573  ######## MPI (optional)  ######## MPI (optional)
574    
575    if env['mpi']=='no':
576        env['mpi']='none'
577    
578  env['usempi'] = env['mpi']!='none'  env['usempi'] = env['mpi']!='none'
579  mpi_inc_path=''  mpi_inc_path=''
580  mpi_lib_path=''  mpi_lib_path=''
# Line 658  else: Line 676  else:
676      print("          LAPACK:  DISABLED")      print("          LAPACK:  DISABLED")
677  d_list=[]  d_list=[]
678  e_list=[]  e_list=[]
679  for i in 'debug','openmp','netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':  for i in 'debug','openmp','netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit','vsl_random':
680      if env[i]: e_list.append(i)      if env[i]: e_list.append(i)
681      else: d_list.append(i)      else: d_list.append(i)
682  for i in e_list:  for i in e_list:
# Line 675  elif env['gmsh']=='s': Line 693  elif env['gmsh']=='s':
693      print("            gmsh:  FOUND")      print("            gmsh:  FOUND")
694  else:  else:
695      print("            gmsh:  NOT FOUND")      print("            gmsh:  NOT FOUND")
696  print("      vsl_random:  %s"%env['vsl_random'])  if env['numpy_h']:
697        print("   numpy headers:  FOUND")
698    else:
699        print("   numpy headers:  NOT FOUND")
700            
701  if ((fatalwarning != '') and (env['werror'])):  if ((fatalwarning != '') and (env['werror'])):
702      print("  Treating warnings as errors")      print("  Treating warnings as errors")
# Line 710  env.SConscript(dirs = ['paso/src'], vari Line 731  env.SConscript(dirs = ['paso/src'], vari
731  env.SConscript(dirs = ['weipa/src'], variant_dir='$BUILD_DIR/$PLATFORM/weipa', duplicate=0)  env.SConscript(dirs = ['weipa/src'], variant_dir='$BUILD_DIR/$PLATFORM/weipa', duplicate=0)
732  env.SConscript(dirs = ['escript/src'], variant_dir='$BUILD_DIR/$PLATFORM/escript', duplicate=0)  env.SConscript(dirs = ['escript/src'], variant_dir='$BUILD_DIR/$PLATFORM/escript', duplicate=0)
733  env.SConscript(dirs = ['esysUtils/src'], variant_dir='$BUILD_DIR/$PLATFORM/esysUtils', duplicate=0)  env.SConscript(dirs = ['esysUtils/src'], variant_dir='$BUILD_DIR/$PLATFORM/esysUtils', duplicate=0)
734    env.SConscript(dirs = ['pasowrap/src'], variant_dir='$BUILD_DIR/$PLATFORM/pasowrap', duplicate=0)
735  env.SConscript(dirs = ['dudley/src'], variant_dir='$BUILD_DIR/$PLATFORM/dudley', duplicate=0)  env.SConscript(dirs = ['dudley/src'], variant_dir='$BUILD_DIR/$PLATFORM/dudley', duplicate=0)
736  env.SConscript(dirs = ['finley/src'], variant_dir='$BUILD_DIR/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], variant_dir='$BUILD_DIR/$PLATFORM/finley', duplicate=0)
737  env.SConscript(dirs = ['modellib/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/modellib', duplicate=0)  env.SConscript(dirs = ['modellib/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/modellib', duplicate=0)
# Line 781  env.Alias('install_paso', ['build_paso', Line 803  env.Alias('install_paso', ['build_paso',
803  env.Alias('build_escript', ['install_escript_headers', 'build_escript_lib', 'build_escriptcpp_lib'])  env.Alias('build_escript', ['install_escript_headers', 'build_escript_lib', 'build_escriptcpp_lib'])
804  env.Alias('install_escript', ['build_escript', 'install_escript_lib', 'install_escriptcpp_lib', 'install_escript_py'])  env.Alias('install_escript', ['build_escript', 'install_escript_lib', 'install_escriptcpp_lib', 'install_escript_py'])
805    
806    env.Alias('build_pasowrap', ['install_pasowrap_headers', 'build_pasowrap_lib', 'build_pasowrapcpp_lib'])
807    env.Alias('install_pasowrap', ['build_pasowrap', 'install_pasowrap_lib', 'install_pasowrapcpp_lib', 'install_pasowrap_py'])
808    
809    
810  env.Alias('build_dudley', ['install_dudley_headers', 'build_dudley_lib', 'build_dudleycpp_lib'])  env.Alias('build_dudley', ['install_dudley_headers', 'build_dudley_lib', 'build_dudleycpp_lib'])
811  env.Alias('install_dudley', ['build_dudley', 'install_dudley_lib', 'install_dudleycpp_lib', 'install_dudley_py'])  env.Alias('install_dudley', ['build_dudley', 'install_dudley_lib', 'install_dudleycpp_lib', 'install_dudley_py'])
812    
# Line 798  build_all_list = [] Line 824  build_all_list = []
824  build_all_list += ['build_esysUtils']  build_all_list += ['build_esysUtils']
825  build_all_list += ['build_paso']  build_all_list += ['build_paso']
826  build_all_list += ['build_escript']  build_all_list += ['build_escript']
827    build_all_list += ['build_pasowrap']
828  build_all_list += ['build_dudley']  build_all_list += ['build_dudley']
829  build_all_list += ['build_finley']  build_all_list += ['build_finley']
830  build_all_list += ['build_weipa']  build_all_list += ['build_weipa']
# Line 811  install_all_list += ['target_init'] Line 838  install_all_list += ['target_init']
838  install_all_list += ['install_esysUtils']  install_all_list += ['install_esysUtils']
839  install_all_list += ['install_paso']  install_all_list += ['install_paso']
840  install_all_list += ['install_escript']  install_all_list += ['install_escript']
841    install_all_list += ['install_pasowrap']
842  install_all_list += ['install_dudley']  install_all_list += ['install_dudley']
843  install_all_list += ['install_finley']  install_all_list += ['install_finley']
844  install_all_list += ['install_weipa']  install_all_list += ['install_weipa']

Legend:
Removed from v.3604  
changed lines
  Added in v.3784

  ViewVC Help
Powered by ViewVC 1.1.26