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

Diff of /branches/arrexp_trunk2098/SConstruct

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

revision 2142 by jfenwick, Mon Dec 1 01:16:18 2008 UTC revision 2143 by jfenwick, Tue Dec 9 06:28:10 2008 UTC
# 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      BoolOption('usenumarray','Compile methods using boost::numeric::array (deprecated)','yes'),
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 174  if env["CC"] == "icc": Line 175  if env["CC"] == "icc":
175    omp_libs      = ['guide', 'pthread']    omp_libs      = ['guide', 'pthread']
176    pedantic      = ""    pedantic      = ""
177    fatalwarning      = ""        # Switch to turn warnings into errors    fatalwarning      = ""        # Switch to turn warnings into errors
178      numarrayoff       = "-DNONUMARRAY"
179  elif env["CC"] == "gcc":  elif env["CC"] == "gcc":
180    # GNU C on any system    # GNU C on any system
181    cc_flags      = "-pedantic -Wall -fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER -isystem " + env['boost_path'] + "/boost -isystem " + env['python_path'] + " -Wno-sign-compare -Wno-system-headers -Wno-strict-aliasing -Wno-long-long"    cc_flags      = "-pedantic -Wall -fPIC -ansi -ffast-math -Wno-unknown-pragmas -DBLOCKTIMER -isystem " + env['boost_path'] + "/boost -isystem " + env['python_path'] + " -Wno-sign-compare -Wno-system-headers -Wno-strict-aliasing -Wno-long-long"
# Line 187  elif env["CC"] == "gcc": Line 189  elif env["CC"] == "gcc":
189    omp_libs      = []    omp_libs      = []
190    pedantic      = "-pedantic-errors -Wno-long-long"    pedantic      = "-pedantic-errors -Wno-long-long"
191    fatalwarning      = "-Werror"    fatalwarning      = "-Werror"
192      numarrayoff       = "-DNONUMARRAY"
193  elif env["CC"] == "cl":  elif env["CC"] == "cl":
194    # Microsoft Visual C on Windows    # Microsoft Visual C on Windows
195    cc_flags      = "/FD /EHsc /GR /wd4068 -D_USE_MATH_DEFINES -DDLL_NETCDF"    cc_flags      = "/FD /EHsc /GR /wd4068 -D_USE_MATH_DEFINES -DDLL_NETCDF"
# Line 197  elif env["CC"] == "cl": Line 200  elif env["CC"] == "cl":
200    omp_libs      = []    omp_libs      = []
201    pedantic      = ""    pedantic      = ""
202    fatalwarning      = ""    fatalwarning      = ""
203      numarrayoff       = "-DNONUMARRAY"
204  elif env["CC"] == "icl":  elif env["CC"] == "icl":
205    # intel C on Windows, see windows_intelc_options.py for a start    # intel C on Windows, see windows_intelc_options.py for a start
206    pedantic      = ""    pedantic      = ""
207    fatalwarning      = ""    fatalwarning      = ""
208      numarrayoff       = "-DNONUMARRAY"
209    
210  # If not specified in hostname_options.py then set them here  # If not specified in hostname_options.py then set them here
211  if env["cc_flags"]  == "-DEFAULT_1": env['cc_flags'] = cc_flags  if env["cc_flags"]  == "-DEFAULT_1": env['cc_flags'] = cc_flags
# Line 468  else: Line 473  else:
473    env.Append(CCFLAGS        = env['cc_optim'])    env.Append(CCFLAGS        = env['cc_optim'])
474    env.Append(CCFLAGS        = env['omp_optim'])    env.Append(CCFLAGS        = env['omp_optim'])
475    
476    if not env['usenumarray']:
477      env.Append(CCFLAGS = numarrayoff)
478      print "Adding "+numarrayoff+ "to CCFLAGS"
479      print env['CCFLAGS']
480    
481  # Always use cc_flags  # Always use cc_flags
482  env.Append(CCFLAGS      = env['cc_flags'])  env.Append(CCFLAGS      = env['cc_flags'])
483  env.Append(LIBS         = [env['omp_libs']])  env.Append(LIBS         = [env['omp_libs']])
# Line 531  if ((fatalwarning != "") and (env['usewa Line 541  if ((fatalwarning != "") and (env['usewa
541    env.Append(CCFLAGS        = fatalwarning)    env.Append(CCFLAGS        = fatalwarning)
542    env_mpi.Append(CCFLAGS        = fatalwarning)    env_mpi.Append(CCFLAGS        = fatalwarning)
543    
544    
545    
546    
547    
548  ############ Summarize our environment #########################  ############ Summarize our environment #########################
549    
550  print ""  print ""
# Line 559  else: print "  Not compiling for debug" Line 573  else: print "  Not compiling for debug"
573  print " Installing in", prefix  print " Installing in", prefix
574  if ((fatalwarning != "") and (env['usewarnings'])): print " Treating warnings as errors"  if ((fatalwarning != "") and (env['usewarnings'])): print " Treating warnings as errors"
575  else: print "   Not treating warnings as errors"  else: print "   Not treating warnings as errors"
576    if env['usenumarray']: print "  Compiling deprecated numarray support in c++"
577    else: print "   Not compiling deprecated numarray support in c++"
578  print ""  print ""
579    
580  ############ Delete option-dependent files #####################  ############ Delete option-dependent files #####################

Legend:
Removed from v.2142  
changed lines
  Added in v.2143

  ViewVC Help
Powered by ViewVC 1.1.26