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

Diff of /branches/diaplayground/SConstruct

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

revision 757 by woo409, Mon Jun 26 13:12:56 2006 UTC revision 759 by bcumming, Thu Jun 29 01:53:23 2006 UTC
# Line 62  opts.AddOptions( Line 62  opts.AddOptions(
62    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'),    ('cc_flags_debug', 'C compiler flags to use (Debug build)', '-g -O0 -ffast-math -std=c99 -fpic -Wno-unknown-pragmas'),
63    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),    ('cxx_flags', 'C++ compiler flags to use (Release build)', '--no-warn -ansi'),
64    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),    ('cxx_flags_debug', 'C++ compiler flags to use (Debug build)', '--no-warn -ansi -DDOASSERT -DDOPROF'),
65      ('cc_flags_MPI','C compiler flags to use (Release MPI build)', '-O3 -ftz -IPF_ftlacc- -IPF_fma -fno-alias -fno-alias -c99 -w1 -fpic -wd161'),
66      ('cc_flags_debug_MPI', 'C compiler flags to use (Debug MPI build)', '-g -O0 -c99 -w1 -fpic -wd161'),
67      ('cxx_flags_MPI', 'C++ compiler flags to use (Release MPI build)', '-ansi -wd1563 -wd161'),
68      ('cxx_flags_debug_MPI', 'C++ compiler flags to use (Debug MPI build)', '-ansi -DDOASSERT -DDOPROF -wd1563 -wd161'),
69    ('ar_flags', 'Static library archiver flags to use', None),    ('ar_flags', 'Static library archiver flags to use', None),
70    ('sys_libs', 'System libraries to link with', None),    ('sys_libs', 'System libraries to link with', None),
71    ('tar_flags','flags for zip files','-c -z'),    ('tar_flags','flags for zip files','-c -z'),
# Line 73  opts.AddOptions( Line 77  opts.AddOptions(
77    PathOption('scsl_path', 'Path to SCSL includes', None),    PathOption('scsl_path', 'Path to SCSL includes', None),
78    PathOption('scsl_lib_path', 'Path to SCSL libs', None),    PathOption('scsl_lib_path', 'Path to SCSL libs', None),
79    ('scsl_libs', 'SCSL libraries to link with', None),    ('scsl_libs', 'SCSL libraries to link with', None),
80      ('scsl_libs_MPI', 'SCSL libraries to link with for MPI build', None),
81  # UMFPACK  # UMFPACK
82    PathOption('umf_path', 'Path to UMF includes', None),    PathOption('umf_path', 'Path to UMF includes', None),
83    PathOption('umf_lib_path', 'Path to UMF libs', None),    PathOption('umf_lib_path', 'Path to UMF libs', None),
# Line 93  opts.AddOptions( Line 98  opts.AddOptions(
98    PathOption('papi_path', 'Path to PAPI includes', None),    PathOption('papi_path', 'Path to PAPI includes', None),
99    PathOption('papi_lib_path', 'Path to PAPI libs', None),    PathOption('papi_lib_path', 'Path to PAPI libs', None),
100    ('papi_libs', 'PAPI libraries to link with', None),    ('papi_libs', 'PAPI libraries to link with', None),
101    # MPI
102      BoolOption('useMPI', 'Compile parallel version using MPI', 'no'),
103  )  )
104    
105  # Initialise Scons Build Environment  # Initialise Scons Build Environment
# Line 175  try: Line 182  try:
182  except KeyError:  except KeyError:
183     dodebug = None       dodebug = None  
184  try:  try:
185       useMPI = env['useMPI']
186    except KeyError:
187       useMPI = None  
188    try:
189     cc_defines = env['cc_defines']     cc_defines = env['cc_defines']
190     env.Append(CPPDEFINES = cc_defines)     env.Append(CPPDEFINES = cc_defines)
191  except KeyError:  except KeyError:
192     pass     pass
193  if dodebug:  if dodebug:
194     try:    if useMPI:
195        try:
196          flags = env['cc_flags_debug_MPI']
197          env.Append(CCFLAGS = flags)
198        except KeyError:
199          pass
200      else:                      
201        try:
202        flags = env['cc_flags_debug']        flags = env['cc_flags_debug']
203        env.Append(CCFLAGS = flags)        env.Append(CCFLAGS = flags)
204     except KeyError:      except KeyError:
205        pass        pass
206  else:  else:
207      if useMPI:
208     try:     try:
209        flags = env['cc_flags']       flags = env['cc_flags_MPI']
210        env.Append(CCFLAGS = flags)       env.Append(CCFLAGS = flags)
211     except KeyError:     except KeyError:
212        pass        pass
213      else:
 if dodebug:  
214     try:     try:
215        flags = env['cxx_flags_debug']        flags = env['cc_flags']
216        env.Append(CXXFLAGS = flags)        env.Append(CCFLAGS = flags)
217     except KeyError:     except KeyError:
218        pass        pass
219    if dodebug:
220       if useMPI:
221         try:
222            flags = env['cxx_flags_debug_MPI']
223            env.Append(CXXFLAGS = flags)
224         except KeyError:
225            pass
226       else:
227         try:
228            flags = env['cxx_flags_debug']
229            env.Append(CXXFLAGS = flags)
230         except KeyError:
231            pass
232  else:  else:
233     try:     if useMPI:
234        flags = env['cxx_flags']       try:
235        env.Append(CXXFLAGS = flags)          flags = env['cxx_flags_MPI']
236     except KeyError:          env.Append(CXXFLAGS = flags)
237        pass       except KeyError:
238            pass
239       else:
240         try:
241            flags = env['cxx_flags']
242            env.Append(CXXFLAGS = flags)
243         except KeyError:
244            pass
245  try:  try:
246     flags = env['ar_flags']     flags = env['ar_flags']
247     env.Append(ARFLAGS = flags)     env.Append(ARFLAGS = flags)
# Line 247  try: Line 284  try:
284     env.Append(LIBPATH = [lib_path,])     env.Append(LIBPATH = [lib_path,])
285  except KeyError:  except KeyError:
286     pass     pass
287  try:  if useMPI:  
288     scsl_libs = env['scsl_libs']    try:
289  except KeyError:      scsl_libs = env['scsl_libs_MPI']
290     scsl_libs = ''    except KeyError:
291        scsl_libs = ''
292    else:        
293      try:
294        scsl_libs = env['scsl_libs']
295      except KeyError:
296        scsl_libs = ''
297  try:  try:
298     includes = env['umf_path']     includes = env['umf_path']
299     env.Append(CPPPATH = [includes,])     env.Append(CPPPATH = [includes,])
# Line 384  env.Alias(init_target) Line 427  env.Alias(init_target)
427  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",  Export(["env", "incinstall", "libinstall", "pyinstall", "dodebug", "mkl_libs", "scsl_libs", "umf_libs",
428      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",      "boost_lib", "python_lib", "doxygen_path", "epydoc_path", "papi_libs",
429          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",          "sys_libs", "test_zipfile", "src_zipfile", "test_tarfile", "src_tarfile", "examples_tarfile", "examples_zipfile",
430          "guide_pdf", "guide_html_index", "api_epydoc"])          "guide_pdf", "guide_html_index", "api_epydoc", "useMPI"])
431    
432  # End initialisation section  # End initialisation section
433  # Begin configuration section  # Begin configuration section
# Line 413  env.SConscript(dirs = ['pyvisi/py_src'], Line 456  env.SConscript(dirs = ['pyvisi/py_src'],
456    
457  # added by Ben Cumming  # added by Ben Cumming
458  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)  env.SConscript(dirs = ['pythonMPI/src'], build_dir='build/$PLATFORM/pythonMPI', duplicate=0)
459    env.SConscript(dirs = ['../test'], build_dir='../test/build', duplicate=0)

Legend:
Removed from v.757  
changed lines
  Added in v.759

  ViewVC Help
Powered by ViewVC 1.1.26