/[escript]/branches/4.0fordebian/SConstruct
ViewVC logotype

Diff of /branches/4.0fordebian/SConstruct

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

revision 3896 by caltinay, Fri May 11 01:31:29 2012 UTC revision 3947 by caltinay, Wed Aug 22 23:19:10 2012 UTC
# Line 1  Line 1 
1  ########################################################  ########################################################
2  #  #
3  # Copyright (c) 2003-2010 by University of Queensland  # Copyright (c) 2003-2012 by University of Queensland
4  # Earth Systems Science Computational Center (ESSCC)  # Earth Systems Science Computational Center (ESSCC)
5  # http://www.uq.edu.au/esscc  # http://www.uq.edu.au/esscc
6  #  #
# Line 110  vars.AddVariables( Line 110  vars.AddVariables(
110    BoolVariable('visit', 'Enable the VisIt simulation interface', False),    BoolVariable('visit', 'Enable the VisIt simulation interface', False),
111    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),    ('visit_prefix', 'Prefix/Paths to VisIt installation', default_prefix),
112    ('visit_libs', 'VisIt libraries to link with', ['simV2']),    ('visit_libs', 'VisIt libraries to link with', ['simV2']),
   BoolVariable('pyvisi', 'Enable pyvisi (deprecated, requires VTK module)', False),  
113    BoolVariable('vsl_random', 'Use VSL from intel for random data', False),    BoolVariable('vsl_random', 'Use VSL from intel for random data', False),
114  # Advanced settings  # Advanced settings
115    #dudley_assemble_flags = -funroll-loops      to actually do something    #dudley_assemble_flags = -funroll-loops      to actually do something
# Line 131  vars.AddVariables( Line 130  vars.AddVariables(
130    ('pythoncmd', 'which python to compile with','python'),    ('pythoncmd', 'which python to compile with','python'),
131    ('usepython3', 'Is this a python3 build? (experimental)', False),    ('usepython3', 'Is this a python3 build? (experimental)', False),
132    ('pythonlibname', 'Name of the python library to link. (This is found automatically for python2.X.)', ''),    ('pythonlibname', 'Name of the python library to link. (This is found automatically for python2.X.)', ''),
133      ('pythonlibpath', 'Path to the python library. (You should not need to set this unless your python has moved)',''),
134      ('pythonincpath','Path to python include files. (You should not need to set this unless your python has moved',''),
135  )  )
136    
137  ##################### Create environment and help text #######################  ##################### Create environment and help text #######################
# Line 402  if conf.CheckFunc('gethostname'): Line 403  if conf.CheckFunc('gethostname'):
403    
404  ######## Python headers & library (required)  ######## Python headers & library (required)
405    
406    #First we check to see if the config file has specified
407    ##Where to find the filae. Ideally, this should be automatic
408    #But we need to deal with the case where python is not in its INSTALL
409    #Directory
410  # Use the python scons is running  # Use the python scons is running
411  if env['pythoncmd']=='python':  if env['pythoncmd']=='python':
412      python_inc_path=sysconfig.get_python_inc()      python_inc_path=sysconfig.get_python_inc()
# Line 457  else: Line 462  else:
462      p.wait()      p.wait()
463      python_lib_path=python_lib_path.strip()      python_lib_path=python_lib_path.strip()
464    
465    #Check for an override from the config file.
466    #Ideally, this should be automatic
467    #But we need to deal with the case where python is not in its INSTALL
468    #Directory
469    if env['pythonlibpath']!='':
470        python_lib_path=env['pythonlibpath']
471    
472    if env['pythonincpath']!='':
473        python_inc_path=env['pythonincpath']
474    
475    
476  if sysheaderopt == '':  if sysheaderopt == '':
477      conf.env.AppendUnique(CPPPATH = [python_inc_path])      conf.env.AppendUnique(CPPPATH = [python_inc_path])
478  else:  else:
# Line 530  try: Line 546  try:
546  except:  except:
547      env['cppunit']=False      env['cppunit']=False
548    
 ######## VTK (optional)  
   
 if env['pyvisi']:  
     try:  
         import vtk  
         env['pyvisi'] = True  
     except ImportError:  
         print("Cannot import vtk, disabling pyvisi.")  
         env['pyvisi'] = False  
   
549  ######## netCDF (optional)  ######## netCDF (optional)
550    
551  netcdf_inc_path=''  netcdf_inc_path=''
# Line 799  env.SConscript(dirs = ['pasowrap/src'], Line 805  env.SConscript(dirs = ['pasowrap/src'],
805  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)
806  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)
807  env.SConscript(dirs = ['ripley/src'], variant_dir='$BUILD_DIR/$PLATFORM/ripley', duplicate=0)  env.SConscript(dirs = ['ripley/src'], variant_dir='$BUILD_DIR/$PLATFORM/ripley', duplicate=0)
808    env.SConscript(dirs = ['downunder/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/downunder', duplicate=0)
809  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)
 env.SConscript(dirs = ['doc'], variant_dir='$BUILD_DIR/$PLATFORM/doc', duplicate=0)  
 env.SConscript(dirs = ['pyvisi/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/pyvisi', duplicate=0)  
810  env.SConscript(dirs = ['pycad/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/pycad', duplicate=0)  env.SConscript(dirs = ['pycad/py_src'], variant_dir='$BUILD_DIR/$PLATFORM/pycad', duplicate=0)
811  env.SConscript(dirs = ['pythonMPI/src'], variant_dir='$BUILD_DIR/$PLATFORM/pythonMPI', duplicate=0)  env.SConscript(dirs = ['pythonMPI/src'], variant_dir='$BUILD_DIR/$PLATFORM/pythonMPI', duplicate=0)
812    env.SConscript(dirs = ['doc'], variant_dir='$BUILD_DIR/$PLATFORM/doc', duplicate=0)
813  env.SConscript(dirs = ['paso/profiling'], variant_dir='$BUILD_DIR/$PLATFORM/paso/profiling', duplicate=0)  env.SConscript(dirs = ['paso/profiling'], variant_dir='$BUILD_DIR/$PLATFORM/paso/profiling', duplicate=0)
814    
815    
# Line 850  buildvars.write("mpi=%s\n"%env['mpi']) Line 856  buildvars.write("mpi=%s\n"%env['mpi'])
856  buildvars.write("mpi_inc_path=%s\n"%mpi_inc_path)  buildvars.write("mpi_inc_path=%s\n"%mpi_inc_path)
857  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)  buildvars.write("mpi_lib_path=%s\n"%mpi_lib_path)
858  buildvars.write("lapack=%s\n"%env['lapack'])  buildvars.write("lapack=%s\n"%env['lapack'])
 buildvars.write("pyvisi=%d\n"%env['pyvisi'])  
859  buildvars.write("vsl_random=%d\n"%int(env['vsl_random']))  buildvars.write("vsl_random=%d\n"%int(env['vsl_random']))
860  for i in 'netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':  for i in 'netcdf','parmetis','papi','mkl','umfpack','boomeramg','silo','visit':
861      buildvars.write("%s=%d\n"%(i, int(env[i])))      buildvars.write("%s=%d\n"%(i, int(env[i])))
# Line 921  install_all_list += ['install_finley'] Line 926  install_all_list += ['install_finley']
926  install_all_list += ['install_ripley']  install_all_list += ['install_ripley']
927  install_all_list += ['install_weipa']  install_all_list += ['install_weipa']
928  if not IS_WINDOWS: install_all_list += ['install_escriptreader']  if not IS_WINDOWS: install_all_list += ['install_escriptreader']
929  #install_all_list += ['install_pyvisi_py']  install_all_list += ['install_downunder_py']
930  install_all_list += ['install_modellib_py']  install_all_list += ['install_modellib_py']
931  install_all_list += ['install_pycad_py']  install_all_list += ['install_pycad_py']
932  if env['usempi']:   install_all_list += ['install_pythonMPI']  if env['usempi']:   install_all_list += ['install_pythonMPI']
# Line 933  env.Default('install_all') Line 938  env.Default('install_all')
938    
939  ################## Targets to build and run the test suite ###################  ################## Targets to build and run the test suite ###################
940    
 test_msg = env.Command('.dummy.', None, '@echo "Cannot run C/C++ unit tests, CppUnit not found!";exit 1')  
941  if not env['cppunit']:  if not env['cppunit']:
942        test_msg = env.Command('.dummy.', None, '@echo "Cannot run C/C++ unit tests, CppUnit not found!";exit 1')
943      env.Alias('run_tests', test_msg)      env.Alias('run_tests', test_msg)
944  env.Alias('run_tests', ['install_all'])  env.Alias('run_tests', ['install_all'])
945  env.Alias('all_tests', ['install_all', 'run_tests', 'py_tests'])  env.Alias('all_tests', ['install_all', 'run_tests', 'py_tests'])

Legend:
Removed from v.3896  
changed lines
  Added in v.3947

  ViewVC Help
Powered by ViewVC 1.1.26