/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2232 by jfenwick, Fri Jan 30 05:24:02 2009 UTC revision 2276 by jfenwick, Tue Feb 17 06:21:31 2009 UTC
# Line 15  Line 15 
15  EnsureSConsVersion(0,96,91)  EnsureSConsVersion(0,96,91)
16  EnsurePythonVersion(2,3)  EnsurePythonVersion(2,3)
17    
18  import sys, os, re, socket  import sys, os, re, socket, platform
19    
20  # Add our extensions  # Add our extensions
21  if os.path.isdir('scons'): sys.path.append('scons')  if os.path.isdir('scons'): sys.path.append('scons')
# Line 75  opts.AddOptions( Line 75  opts.AddOptions(
75    BoolOption('useopenmp', 'Compile parallel version using OpenMP', 'yes'),    BoolOption('useopenmp', 'Compile parallel version using OpenMP', 'yes'),
76    BoolOption('usepedantic', 'Compile with -pedantic if using gcc', 'no'),    BoolOption('usepedantic', 'Compile with -pedantic if using gcc', 'no'),
77    BoolOption('usewarnings','Compile with warnings as errors if using gcc','yes'),    BoolOption('usewarnings','Compile with warnings as errors if using gcc','yes'),
78      ('forcelazy','for testing use only - set the default value for autolazy','leave_alone'),
79  # Python  # Python
80    ('python_path', 'Path to Python includes', '/usr/include/'+python_version),    ('python_path', 'Path to Python includes', '/usr/include/'+python_version),
81    ('python_lib_path', 'Path to Python libs', usr_lib),    ('python_lib_path', 'Path to Python libs', usr_lib),
# Line 220  if env["omp_optim"]    == "-DEFAULT_4": env Line 221  if env["omp_optim"]    == "-DEFAULT_4": env
221  if env["omp_debug"] == "-DEFAULT_5": env['omp_debug'] = omp_debug  if env["omp_debug"] == "-DEFAULT_5": env['omp_debug'] = omp_debug
222  if env["omp_libs"]  == "-DEFAULT_6": env['omp_libs'] = omp_libs  if env["omp_libs"]  == "-DEFAULT_6": env['omp_libs'] = omp_libs
223    
224    #set up the autolazy values
225    if env['forcelazy']    != "leave_alone":
226      if env['forcelazy'] == 'on':
227        env.Append(CPPDEFINES='FAUTOLAZYON')
228      else:
229         if env['forcelazy'] == 'off':
230        env.Append(CPPDEFINES='FAUTOLAZYOFF')
231    
232  # OpenMP is disabled if useopenmp=no or both variables omp_optim and omp_debug are empty  # OpenMP is disabled if useopenmp=no or both variables omp_optim and omp_debug are empty
233  if not env["useopenmp"]:  if not env["useopenmp"]:
234    env['omp_optim'] = ""    env['omp_optim'] = ""
# Line 624  if not env['usempi']: Execute(Delete(env Line 633  if not env['usempi']: Execute(Delete(env
633    
634  ############ Build the subdirectories ##########################  ############ Build the subdirectories ##########################
635    
636    from grouptest import *
637    
638    TestGroups=[]
639    
640  Export(  Export(
641    ["env",    ["env",
642     "env_mpi",     "env_mpi",
643     "clone_env",     "clone_env",
644     "IS_WINDOWS_PLATFORM"     "IS_WINDOWS_PLATFORM",
645       "TestGroups"
646     ]     ]
647    )    )
648    
# Line 646  env.SConscript(dirs = ['pythonMPI/src'], Line 660  env.SConscript(dirs = ['pythonMPI/src'],
660  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)
661  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)
662    
663    
664  ############ Remember what optimizations we used ###############  ############ Remember what optimizations we used ###############
665    
666  remember_list = []  remember_list = []
# Line 719  env.Alias('all_tests', ['install_all', ' Line 734  env.Alias('all_tests', ['install_all', '
734    
735  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'])
736    
737    if not IS_WINDOWS_PLATFORM:
738       try:
739        utest=open("utest.sh","w")
740        build_platform=os.name      #Sometimes Mac python says it is posix
741        if (build_platform=='posix') and platform.system()=="Darwin":
742            build_platform='darwin'
743        utest.write(GroupTest.makeHeader(build_platform))
744        for tests in TestGroups:
745            utest.write(tests.makeString())
746        utest.close()
747        print "utest.sh written"
748       except IOError:
749        print "Error attempting to write unittests file."
750        sys.exit(1)
751    

Legend:
Removed from v.2232  
changed lines
  Added in v.2276

  ViewVC Help
Powered by ViewVC 1.1.26