/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 1459 by ksteube, Thu Mar 27 01:49:10 2008 UTC revision 1663 by artak, Tue Jul 22 02:56:21 2008 UTC
# Line 215  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 297  if IS_WINDOWS_PLATFORM: Line 300  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)        #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 356  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  else: Line 485  else:
485          env.Append(CXXFLAGS = flags)          env.Append(CXXFLAGS = flags)
486       except KeyError:       except KeyError:
487          pass          pass
488    
489    # Impassioned plea - please do this sort of thing in the options files.
490  try:  try:
491       if env['CC'] == 'gcc': env.Append(CCFLAGS = "-pedantic-errors -Wno-long-long")       #if env['CC'] == 'gcc': env.Append(CCFLAGS = "-pedantic-errors -Wno-long-long")
492         pass
493  except:  except:
494       pass       pass
495    
496    if dodebug:
497         try:
498            flags = env['link_flags_debug']
499            env.Append(LINKFLAGS = flags)
500         except KeyError:
501            pass
502    else:
503         try:
504            flags = env['link_flags']
505            env.Append(LINKFLAGS = flags)
506         except KeyError:
507            pass
508    
509  # ============= Remember what options were used in the compile =====================================  # ============= Remember what options were used in the compile =====================================
510  if not IS_WINDOWS_PLATFORM:  if not IS_WINDOWS_PLATFORM:
511    env.Execute("/bin/rm -f " + libinstall + "/Compiled.with.*")    env.Execute("/bin/rm -f " + libinstall + "/Compiled.with.*")
# Line 754  except KeyError: Line 774  except KeyError:
774     papi_libs = None     papi_libs = None
775  # ============= set mpi =====================================  # ============= set mpi =====================================
776  if useMPI:  if useMPI:
777     env.Append(CPPDEFINES=['PASO_MPI',])     env.Append(CPPDEFINES=['PASO_MPI', 'MPI_NO_CPPBIND'])
778     try:     try:
779        includes = env['mpi_path']        includes = env['mpi_path']
780        env.Append(CPPPATH = [includes,])        env.Append(CPPPATH = [includes,])
# Line 926  except AttributeError: Line 946  except AttributeError:
946  # Third Party libraries  # Third Party libraries
947  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)
948  # C/C++ Libraries  # C/C++ Libraries
949    env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
950    env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)
951  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
952  # bruce is removed for now as it doesn't really do anything  # bruce is removed for now as it doesn't really do anything
953  # 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)  
954  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)
955  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)
956  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.1459  
changed lines
  Added in v.1663

  ViewVC Help
Powered by ViewVC 1.1.26