/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 2253 by jfenwick, Sun Feb 8 23:35:28 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 469  if env['useumfpack']: Line 478  if env['useumfpack']:
478    
479  if env['useumfpack'] and not conf.CheckCHeader('umfpack.h'): env['useumfpack'] = 0  if env['useumfpack'] and not conf.CheckCHeader('umfpack.h'): env['useumfpack'] = 0
480  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
481  # 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?
482    
483  # Add UMFPACK to environment env if it was found  # Add UMFPACK to environment env if it was found
484  if env['useumfpack']:  if env['useumfpack']:
# Line 728  env.Alias('docs', ['examples_tarfile', ' Line 737  env.Alias('docs', ['examples_tarfile', '
737  if not IS_WINDOWS_PLATFORM:  if not IS_WINDOWS_PLATFORM:
738     try:     try:
739      utest=open("utest.sh","w")      utest=open("utest.sh","w")
740      utest.write(grouptest.makeHeader())      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:      for tests in TestGroups:
745          utest.write(tests.makeString())          utest.write(tests.makeString())
746      utest.close()      utest.close()

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

  ViewVC Help
Powered by ViewVC 1.1.26