/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2183 by artak, Tue Dec 16 03:31:00 2008 UTC revision 2184 by caltinay, Mon Dec 22 04:27:26 2008 UTC
# Line 119  opts.AddOptions( Line 119  opts.AddOptions(
119    ('umf_path', 'Path to UMFPACK includes', '/usr/include/suitesparse'),    ('umf_path', 'Path to UMFPACK includes', '/usr/include/suitesparse'),
120    ('umf_lib_path', 'Path to UMFPACK libs', usr_lib),    ('umf_lib_path', 'Path to UMFPACK libs', usr_lib),
121    ('umf_libs', 'UMFPACK libraries to link with', ['umfpack']),    ('umf_libs', 'UMFPACK libraries to link with', ['umfpack']),
122    # Silo
123      BoolOption('usesilo', 'switch on/off the usage of Silo', 'yes'),
124      ('silo_path', 'Path to Silo includes', '/usr/include'),
125      ('silo_lib_path', 'Path to Silo libs', usr_lib),
126      ('silo_libs', 'Silo libraries to link with', ['siloh5', 'hdf5']),
127  # AMD (used by UMFPACK)  # AMD (used by UMFPACK)
128    ('amd_path', 'Path to AMD includes', '/usr/include/suitesparse'),    ('amd_path', 'Path to AMD includes', '/usr/include/suitesparse'),
129    ('amd_lib_path', 'Path to AMD libs', usr_lib),    ('amd_lib_path', 'Path to AMD libs', usr_lib),
# Line 473  if env['useumfpack']: Line 478  if env['useumfpack']:
478  else:  else:
479    conf.Finish()    conf.Finish()
480    
481    ############ Silo (optional) ###################################
482    
483    if env['usesilo']:
484      conf = Configure(clone_env(env))
485      conf.env.AppendUnique(CPPPATH = [env['silo_path']])
486      conf.env.AppendUnique(LIBPATH = [env['silo_lib_path']])
487      conf.env.AppendUnique(LIBS = [env['silo_libs']])
488      if not conf.CheckCHeader('silo.h'): env['usesilo'] = 0
489      if not conf.CheckFunc('DBMkDir'): env['usesilo'] = 0
490      conf.Finish()
491    
492    # Add the path to Silo to environment env if it was found.
493    # Note that we do not add the libs since they are only needed for the
494    # escriptreader library and tools.
495    if env['usesilo']:
496      env.AppendUnique(CPPPATH = [env['silo_path']])
497      env.AppendUnique(LIBPATH = [env['silo_lib_path']])
498      env.Append(CPPDEFINES = ['HAVE_SILO'])
499    
500  ############ Add the compiler flags ############################  ############ Add the compiler flags ############################
501    
502  # Enable debug by choosing either cc_debug or cc_optim  # Enable debug by choosing either cc_debug or cc_optim
# Line 561  if env['usemkl']: print "  Using MKL" Line 585  if env['usemkl']: print "  Using MKL"
585  else: print "   Not using MKL"  else: print "   Not using MKL"
586  if env['useumfpack']: print "   Using UMFPACK"  if env['useumfpack']: print "   Using UMFPACK"
587  else: print "   Not using UMFPACK"  else: print "   Not using UMFPACK"
588    if env['usesilo']: print "  Using Silo"
589    else: print "   Not using Silo"
590  if env['useopenmp']: print "    Using OpenMP"  if env['useopenmp']: print "    Using OpenMP"
591  else: print "   Not using OpenMP"  else: print "   Not using OpenMP"
592  if env['usempi']: print "   Using MPI"  if env['usempi']: print "   Using MPI"
# Line 605  Export( Line 631  Export(
631    )    )
632    
633  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
634    env.SConscript(dirs = ['tools/libescriptreader/src'], build_dir='build/$PLATFORM/tools/libescriptreader', duplicate=0)
635  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
636  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)
637  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
# Line 658  build_all_list += ['build_escript'] Line 685  build_all_list += ['build_escript']
685  build_all_list += ['build_finley']  build_all_list += ['build_finley']
686  if env['usempi']:       build_all_list += ['target_pythonMPI_exe']  if env['usempi']:       build_all_list += ['target_pythonMPI_exe']
687  if not IS_WINDOWS_PLATFORM: build_all_list += ['target_finley_wrapper']  if not IS_WINDOWS_PLATFORM: build_all_list += ['target_finley_wrapper']
688    if env['usesilo']:  build_all_list += ['target_escript2silo']
689  env.Alias('build_all', build_all_list)  env.Alias('build_all', build_all_list)
690    
691  install_all_list = []  install_all_list = []
# Line 671  install_all_list += ['target_install_mod Line 699  install_all_list += ['target_install_mod
699  install_all_list += ['target_install_pycad_py']  install_all_list += ['target_install_pycad_py']
700  if env['usempi']:       install_all_list += ['target_install_pythonMPI_exe']  if env['usempi']:       install_all_list += ['target_install_pythonMPI_exe']
701  if not IS_WINDOWS_PLATFORM: install_all_list += ['target_install_finley_wrapper']  if not IS_WINDOWS_PLATFORM: install_all_list += ['target_install_finley_wrapper']
702    if env['usesilo']:  install_all_list += ['target_install_escript2silo']
703  install_all_list += ['remember_options']  install_all_list += ['remember_options']
704  env.Alias('install_all', install_all_list)  env.Alias('install_all', install_all_list)
705    

Legend:
Removed from v.2183  
changed lines
  Added in v.2184

  ViewVC Help
Powered by ViewVC 1.1.26