/[escript]/branches/amg_from_3530/SConstruct
ViewVC logotype

Diff of /branches/amg_from_3530/SConstruct

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

revision 3077 by jfenwick, Mon Aug 2 23:01:14 2010 UTC revision 3078 by jfenwick, Tue Aug 3 03:12:16 2010 UTC
# Line 181  adder( Line 181  adder(
181    BoolVariable('iknowwhatimdoing','allow nonstandard C',False)    BoolVariable('iknowwhatimdoing','allow nonstandard C',False)
182  )  )
183    
184    
185    ###################
186    
187    # This is only to support old versions of scons which don't accept
188    # the variant_dir parameter (older than 0.98 I think).
189    # Once these are no longer an issue we can go back to a direct call
190    # to obj.SConscript
191    import SCons
192    vs=SCons.__version__.split('.')
193    cantusevariantdir=float(vs[0]+'.'+vs[1])<0.98
194    
195    
196    def CallSConscript(obj, **kw):
197        if cantusevariantdir:
198            if 'variant_dir' in kw:
199            kw['build_dir']=kw['variant_dir']
200            del kw['variant_dir']
201        obj.SConscript(**kw)
202    
203    
204  ############ Specify which compilers to use ####################  ############ Specify which compilers to use ####################
205    
206  # intelc uses regular expressions improperly and emits a warning about  # intelc uses regular expressions improperly and emits a warning about
# Line 200  else: Line 220  else:
220        if env['tools_names']!='default':        if env['tools_names']!='default':
221      env=Environment(tools = ['default'] +env['tools_names'], options=opts)      env=Environment(tools = ['default'] +env['tools_names'], options=opts)
222    
   
   
   
223  # Override compiler choice if provided  # Override compiler choice if provided
224  if env['cc'] != 'DEFAULT': env['CC']=env['cc']  if env['cc'] != 'DEFAULT': env['CC']=env['cc']
225  if env['cxx'] != 'DEFAULT': env['CXX']=env['cxx']  if env['cxx'] != 'DEFAULT': env['CXX']=env['cxx']
# Line 815  Export( Line 832  Export(
832     "clone_env",     "clone_env",
833     "dodgy_env",     "dodgy_env",
834     "IS_WINDOWS_PLATFORM",     "IS_WINDOWS_PLATFORM",
835     "TestGroups"     "TestGroups",
836       "CallSConscript",
837       "cantusevariantdir"
838     ]     ]
839    )    )
840    
841  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)  CallSConscript(env, dirs = ['tools/CppUnitTest/src'], variant_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
842  env.SConscript(dirs = ['tools/escriptconvert'], build_dir='build/$PLATFORM/tools/escriptconvert', duplicate=0)  CallSConscript(env, dirs = ['tools/escriptconvert'], variant_dir='build/$PLATFORM/tools/escriptconvert', duplicate=0)
843  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)  CallSConscript(env, dirs = ['paso/src'], variant_dir='build/$PLATFORM/paso', duplicate=0)
844  env.SConscript(dirs = ['weipa/src'], build_dir='build/$PLATFORM/weipa', duplicate=0)  CallSConscript(env, dirs = ['weipa/src'], variant_dir='build/$PLATFORM/weipa', duplicate=0)
845  env.SConscript(dirs = ['escript/src'], build_dir='build/$PLATFORM/escript', duplicate=0)  CallSConscript(env, dirs = ['escript/src'], variant_dir='build/$PLATFORM/escript', duplicate=0)
846  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)  CallSConscript(env, dirs = ['esysUtils/src'], variant_dir='build/$PLATFORM/esysUtils', duplicate=0)
847  env.SConscript(dirs = ['finley/src'], build_dir='build/$PLATFORM/finley', duplicate=0)  CallSConscript(env, dirs = ['finley/src'], variant_dir='build/$PLATFORM/finley', duplicate=0)
848  env.SConscript(dirs = ['modellib/py_src'], build_dir='build/$PLATFORM/modellib', duplicate=0)  CallSConscript(env, dirs = ['modellib/py_src'], variant_dir='build/$PLATFORM/modellib', duplicate=0)
849  env.SConscript(dirs = ['doc'], build_dir='build/$PLATFORM/doc', duplicate=0)  CallSConscript(env, dirs = ['doc'], variant_dir='build/$PLATFORM/doc', duplicate=0)
850  env.SConscript(dirs = ['pyvisi/py_src'], build_dir='build/$PLATFORM/pyvisi', duplicate=0)  CallSConscript(env, dirs = ['pyvisi/py_src'], variant_dir='build/$PLATFORM/pyvisi', duplicate=0)
851  env.SConscript(dirs = ['pycad/py_src'], build_dir='build/$PLATFORM/pycad', duplicate=0)  CallSConscript(env, dirs = ['pycad/py_src'], variant_dir='build/$PLATFORM/pycad', duplicate=0)
852  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)  CallSConscript(env, dirs = ['pythonMPI/src'], variant_dir='build/$PLATFORM/pythonMPI', duplicate=0)
853  env.SConscript(dirs = ['scripts'], build_dir='build/$PLATFORM/scripts', duplicate=0)  CallSConscript(env, dirs = ['scripts'], variant_dir='build/$PLATFORM/scripts', duplicate=0)
854  env.SConscript(dirs = ['paso/profiling'], build_dir='build/$PLATFORM/paso/profiling', duplicate=0)  CallSConscript(env, dirs = ['paso/profiling'], variant_dir='build/$PLATFORM/paso/profiling', duplicate=0)
855    
856    
857  ############ Remember what optimizations we used ###############  ############ Remember what optimizations we used ###############

Legend:
Removed from v.3077  
changed lines
  Added in v.3078

  ViewVC Help
Powered by ViewVC 1.1.26