/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2184 by caltinay, Mon Dec 22 04:27:26 2008 UTC revision 2253 by jfenwick, Sun Feb 8 23:35:28 2009 UTC
# Line 184  if env["CC"] == "icc": Line 184  if env["CC"] == "icc":
184    sysheaderopt      = ""    sysheaderopt      = ""
185  elif env["CC"] == "gcc":  elif env["CC"] == "gcc":
186    # GNU C on any system    # GNU C on any system
187    cc_flags      = "-pedantic -Wall -fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER  -Wno-sign-compare -Wno-system-headers -Wno-long-long"    cc_flags      = "-pedantic -Wall -fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER  -Wno-sign-compare -Wno-system-headers -Wno-long-long -Wno-strict-aliasing"
188  #the long long warning occurs on the Mac  #the long long warning occurs on the Mac
189    cc_optim      = "-O3"    cc_optim      = "-O3"
190    cc_debug      = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK"    cc_debug      = "-g -O0 -DDOASSERT -DDOPROF -DBOUNDS_CHECK"
# Line 469  if env['useumfpack']: Line 469  if env['useumfpack']:
469    
470  if env['useumfpack'] and not conf.CheckCHeader('umfpack.h'): env['useumfpack'] = 0  if env['useumfpack'] and not conf.CheckCHeader('umfpack.h'): env['useumfpack'] = 0
471  if env['useumfpack'] and not conf.CheckFunc('umfpack_di_symbolic'): env['useumfpack'] = 0  if env['useumfpack'] and not conf.CheckFunc('umfpack_di_symbolic'): env['useumfpack'] = 0
472  if env['useumfpack'] and not conf.CheckFunc('daxpy'): env['useumfpack'] = 0 # this does not work on shake73?  # if env['useumfpack'] and not conf.CheckFunc('daxpy'): env['useumfpack'] = 0 # this does not work on shake73?
473    
474  # Add UMFPACK to environment env if it was found  # Add UMFPACK to environment env if it was found
475  if env['useumfpack']:  if env['useumfpack']:
# Line 511  else: Line 511  else:
511  env.Append(CCFLAGS      = env['cc_flags'])  env.Append(CCFLAGS      = env['cc_flags'])
512  env.Append(LIBS         = [env['omp_libs']])  env.Append(LIBS         = [env['omp_libs']])
513    
514    
515    ############ Add some custom builders ##########################
516    
517    py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)
518    env.Append(BUILDERS = {'PyCompile' : py_builder});
519    
520    runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix=env['PROGSUFFIX'], single_source=True)
521    env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});
522    
523    runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True)
524    env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder});
525    
526  ############ MPI (optional) ####################################  ############ MPI (optional) ####################################
527    
528  # Create a modified environment for MPI programs (identical to env if usempi=no)  # Create a modified environment for MPI programs (identical to env if usempi=no)
# Line 609  Execute(Delete(env['libinstall'] + "/Com Line 621  Execute(Delete(env['libinstall'] + "/Com
621  Execute(Delete(env['libinstall'] + "/Compiled.with.openmp"))  Execute(Delete(env['libinstall'] + "/Compiled.with.openmp"))
622  if not env['usempi']: Execute(Delete(env['libinstall'] + "/pythonMPI"))  if not env['usempi']: Execute(Delete(env['libinstall'] + "/pythonMPI"))
623    
 ############ Add some custom builders ##########################  
   
 py_builder = Builder(action = scons_extensions.build_py, suffix = '.pyc', src_suffix = '.py', single_source=True)  
 env.Append(BUILDERS = {'PyCompile' : py_builder});  
624    
625  runUnitTest_builder = Builder(action = scons_extensions.runUnitTest, suffix = '.passed', src_suffix=env['PROGSUFFIX'], single_source=True)  ############ Build the subdirectories ##########################
 env.Append(BUILDERS = {'RunUnitTest' : runUnitTest_builder});  
626    
627  runPyUnitTest_builder = Builder(action = scons_extensions.runPyUnitTest, suffix = '.passed', src_suffic='.py', single_source=True)  from grouptest import *
 env.Append(BUILDERS = {'RunPyUnitTest' : runPyUnitTest_builder});  
628    
629  ############ Build the subdirectories ##########################  TestGroups=[]
630    
631  Export(  Export(
632    ["env",    ["env",
633     "env_mpi",     "env_mpi",
634     "clone_env",     "clone_env",
635     "IS_WINDOWS_PLATFORM"     "IS_WINDOWS_PLATFORM",
636       "TestGroups"
637     ]     ]
638    )    )
639    
# Line 644  env.SConscript(dirs = ['pythonMPI/src'], Line 651  env.SConscript(dirs = ['pythonMPI/src'],
651  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)
652  env.SConscript(dirs = ['paso/profiling'], build_dir='build/$PLATFORM/paso/profiling', duplicate=0)  env.SConscript(dirs = ['paso/profiling'], build_dir='build/$PLATFORM/paso/profiling', duplicate=0)
653    
654    
655  ############ Remember what optimizations we used ###############  ############ Remember what optimizations we used ###############
656    
657  remember_list = []  remember_list = []
# Line 717  env.Alias('all_tests', ['install_all', ' Line 725  env.Alias('all_tests', ['install_all', '
725    
726  env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'api_epydoc', 'api_doxygen', 'guide_pdf', 'guide_html'])  env.Alias('docs', ['examples_tarfile', 'examples_zipfile', 'api_epydoc', 'api_doxygen', 'guide_pdf', 'guide_html'])
727    
728    if not IS_WINDOWS_PLATFORM:
729       try:
730        utest=open("utest.sh","w")
731        utest.write(grouptest.makeHeader())
732        for tests in TestGroups:
733            utest.write(tests.makeString())
734        utest.close()
735        print "utest.sh written"
736       except IOError:
737        print "Error attempting to write unittests file."
738        sys.exit(1)
739    

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

  ViewVC Help
Powered by ViewVC 1.1.26