/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1416 by ksteube, Mon Feb 25 03:56:17 2008 UTC revision 1628 by phornby, Fri Jul 11 13:12:46 2008 UTC
# Line 12  Line 12 
12  EnsureSConsVersion(0,96,91)  EnsureSConsVersion(0,96,91)
13  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
14    
   
15  #===============================================================  #===============================================================
16  #   import tools:  #   import tools:
17  import glob  import glob
# Line 216  opts.AddOptions( Line 215  opts.AddOptions(
215    ('cc_flags_debug', 'C compiler flags to use (Debug build)', cc_flags_debug_default),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', cc_flags_debug_default),
216    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),    ('cxx_flags', 'C++ compiler flags to use (Release build)', cxx_flags_default),
217    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', cxx_flags_debug_default),    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', cxx_flags_debug_default),
218      ('link_flags', 'Linker flags to use (Release build)', None),
219      ('link_flags_debug', 'Linker flags to use (Debug build)', None),
220    
221    ('omp_flags', 'OpenMP compiler flags to use (Release build)', ''),    ('omp_flags', 'OpenMP compiler flags to use (Release build)', ''),
222    ('omp_flags_debug', 'OpenMP compiler flags to use (Debug build)', ''),    ('omp_flags_debug', 'OpenMP compiler flags to use (Debug build)', ''),
223    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
# Line 239  opts.AddOptions( Line 241  opts.AddOptions(
241    PathOption('amd_path', 'Path to AMD includes', amd_path_default),    PathOption('amd_path', 'Path to AMD includes', amd_path_default),
242    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),    PathOption('amd_lib_path', 'Path to AMD libs', amd_lib_path_default),
243    ('amd_libs', 'AMD libraries to link with', amd_libs_default),    ('amd_libs', 'AMD libraries to link with', amd_libs_default),
244    # ParMETIS
245      ('parmetis_path', 'Path to ParMETIS includes', ''),
246      ('parmetis_lib_path', 'Path to ParMETIS library', ''),
247      ('parmetis_lib', 'ParMETIS library to link with', []),
248  # TRILINOS  # TRILINOS
249    PathOption('trilinos_path', 'Path to TRILINOS includes', None),    PathOption('trilinos_path', 'Path to TRILINOS includes', None),
250    PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),    PathOption('trilinos_lib_path', 'Path to TRILINOS libs', None),
# Line 292  opts.AddOptions( Line 298  opts.AddOptions(
298    
299  if IS_WINDOWS_PLATFORM:  if IS_WINDOWS_PLATFORM:
300        env = Environment(tools = ['default', 'msvc'], options = opts)        env = Environment(tools = ['default', 'msvc'], options = opts)
301          #env = Environment(tools = ['default', 'intelc'], options = opts)
302  else:  else:
303     if os.uname()[4]=='ia64':     if socket.gethostname().split('.')[0] == 'service0':
304          env = Environment(tools = ['default', 'intelc'], options = opts)
305       elif os.uname()[4]=='ia64':
306        env = Environment(tools = ['default', 'intelc'], options = opts)        env = Environment(tools = ['default', 'intelc'], options = opts)
307        if env['CXX'] == 'icpc':        if env['CXX'] == 'icpc':
308           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py           env['LINK'] = env['CXX'] # version >=9 of intel c++ compiler requires use of icpc to link in C++ runtimes (icc does not). FIXME: this behaviour could be directly incorporated into scons intelc.py
# Line 352  except KeyError: Line 361  except KeyError:
361    
362  try:  try:
363     tmp = os.environ['LD_LIBRARY_PATH']     tmp = os.environ['LD_LIBRARY_PATH']
    print tmp  
364     env['ENV']['LD_LIBRARY_PATH'] = tmp     env['ENV']['LD_LIBRARY_PATH'] = tmp
365  except KeyError:  except KeyError:
366     pass     pass
# Line 481  try: Line 489  try:
489       if env['CC'] == 'gcc': env.Append(CCFLAGS = "-pedantic-errors -Wno-long-long")       if env['CC'] == 'gcc': env.Append(CCFLAGS = "-pedantic-errors -Wno-long-long")
490  except:  except:
491       pass       pass
492    if dodebug:
493         try:
494            flags = env['link_flags_debug']
495            env.Append(LINKFLAGS = flags)
496         except KeyError:
497            pass
498    else:
499         try:
500            flags = env['link_flags']
501            env.Append(LINKFLAGS = flags)
502         except KeyError:
503            pass
504    
505  # ============= Remember what options were used in the compile =====================================  # ============= Remember what options were used in the compile =====================================
506  if not IS_WINDOWS_PLATFORM:  if not IS_WINDOWS_PLATFORM:
# Line 717  try: Line 737  try:
737     epydoc_path = env['epydoc_path']     epydoc_path = env['epydoc_path']
738  except KeyError:  except KeyError:
739     epydoc_path = None     epydoc_path = None
740    # =============== ParMETIS =======================================
741    try:
742       parmetis_path = env['parmetis_path']
743       parmetis_lib_path = env['parmetis_lib_path']
744       parmetis_lib = env['parmetis_lib']
745    except KeyError:
746       parmetis_path = ''
747       parmetis_lib_path = ''
748       parmetis_lib = ''
749    
750    if useMPI and os.path.isdir(parmetis_lib_path):
751       env.Append(CPPDEFINES = [ 'PARMETIS' ])
752       env.Append(CXXDEFINES = [ 'PARMETIS' ])
753       env.Append(CPPPATH = [parmetis_path])
754       env.Append(LIBPATH = [parmetis_lib_path])
755       env.Append(LIBS = parmetis_lib)
756  # =============== PAPI =======================================  # =============== PAPI =======================================
757  try:  try:
758     includes = env['papi_path']     includes = env['papi_path']
# Line 734  except KeyError: Line 770  except KeyError:
770     papi_libs = None     papi_libs = None
771  # ============= set mpi =====================================  # ============= set mpi =====================================
772  if useMPI:  if useMPI:
773     env.Append(CPPDEFINES=['PASO_MPI',])     env.Append(CPPDEFINES=['PASO_MPI', 'MPI_NO_CPPBIND'])
774     try:     try:
775        includes = env['mpi_path']        includes = env['mpi_path']
776        env.Append(CPPPATH = [includes,])        env.Append(CPPPATH = [includes,])
# Line 906  except AttributeError: Line 942  except AttributeError:
942  # Third Party libraries  # Third Party libraries
943  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)
944  # C/C++ Libraries  # C/C++ Libraries
945    env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
946    env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)
947  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
948  # bruce is removed for now as it doesn't really do anything  # bruce is removed for now as it doesn't really do anything
949  # env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)  # env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)
 env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)  
 env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  
950  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
951  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)
952  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)

Legend:
Removed from v.1416  
changed lines
  Added in v.1628

  ViewVC Help
Powered by ViewVC 1.1.26