/[escript]/trunk/SConstruct
ViewVC logotype

Diff of /trunk/SConstruct

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

revision 6509 by jfenwick, Thu Mar 2 07:36:17 2017 UTC revision 6510 by jfenwick, Thu Mar 2 23:47:07 2017 UTC
# Line 173  env = Environment(tools = ['default'], o Line 173  env = Environment(tools = ['default'], o
173  def mkclang(env):  def mkclang(env):
174      env['CXX']='clang++'      env['CXX']='clang++'
175    
176    if env['tools_names'] != ['default']:
177        zz=env['tools_names']
178        if 'clang' in zz:
179            zz.remove('clang')
180            zz.insert(0, mkclang)
181        env = Environment(tools = ['default'] + env['tools_names'], options = vars,
182                          ENV = {'PATH' : os.environ['PATH']})
183    
184  # Covert env['netcdf'] into one of False, 3, 4  # Covert env['netcdf'] into one of False, 3, 4
185  # Also choose default values for libraries  # Also choose default values for libraries
186  pos1=netcdf_flavours.index('False')  pos1=netcdf_flavours.index('False')
187  pos2=netcdf_flavours.index('3')  pos2=netcdf_flavours.index('3')
188  mypos=netcdf_flavours.index(env['netcdf'])  mypos=netcdf_flavours.index(env['netcdf'])
189  if 0 <= mypos <=pos1:  if 0 <= mypos <=pos1:
190      env['netcdf']=False      env['netcdf']=0
191  elif pos1 < mypos <= pos2:  elif pos1 < mypos <= pos2:
192      env['netcdf']=3      env['netcdf']=3
193        print(env['netcdf'])
194      if env['netcdf_libs']=='DEFAULT':      if env['netcdf_libs']=='DEFAULT':
195          env['netcdf_libs']=['netcdf_c++', 'netcdf']          env['netcdf_libs']=['netcdf_c++', 'netcdf']
196  else:   # netcdf4  else:   # netcdf4
197      env['netcdf']=4      env['netcdf']=4
198      if env['netcdf_libs']=='DEFAULT':      if env['netcdf_libs']=='DEFAULT':
199          env['netcdf_libs']=['netcdf_c++4']          env['netcdf_libs']=['netcdf_c++4']
       
 if env['tools_names'] != ['default']:  
     zz=env['tools_names']  
     if 'clang' in zz:  
         zz.remove('clang')  
         zz.insert(0, mkclang)  
     env = Environment(tools = ['default'] + env['tools_names'], options = vars,  
                       ENV = {'PATH' : os.environ['PATH']})  
200    
201  if options_file:  if options_file:
202      opts_valid=False      opts_valid=False

Legend:
Removed from v.6509  
changed lines
  Added in v.6510

  ViewVC Help
Powered by ViewVC 1.1.26