parameters: (env)
docstring: Add Builders and construction variables for ifort to an Environment.
docstring_summary: Add Builders and construction variables for ifort to an Environment.
docstring_tokens: Add Builders and construction variables for ifort to an Environment .
function: def generate(env):
      """Add Builders and construction variables for ifort to an Environment."""
      # ifort supports Fortran 90 and Fortran 95
      # Additionally, ifort recognizes more file extensions.
      fscan = FortranScan("FORTRANPATH")
      SCons.Tool.SourceFileScanner.add_scanner('.i', fscan)
      SCons.Tool.SourceFileScanner.add_scanner('.i90', fscan)
  
      if 'FORTRANFILESUFFIXES' not in env:
          env['FORTRANFILESUFFIXES'] = ['.i']
      else:
          env['FORTRANFILESUFFIXES'].append('.i')
  
      if 'F90FILESUFFIXES' not in env:
          env['F90FILESUFFIXES'] = ['.i90']
      else:
          env['F90FILESUFFIXES'].append('.i90')
  
      add_all_to_env(env)
  
      fc = 'ifort'
  
      for dialect in ['F77', 'F90', 'FORTRAN', 'F95']:
          env['%s' % dialect] = fc
          env['SH%s' % dialect] = '$%s' % dialect
          if env['PLATFORM'] == 'posix':
              env['SH%sFLAGS' % dialect] = SCons.Util.CLVar('$%sFLAGS -fPIC' % dialect)
  
      if env['PLATFORM'] == 'win32':
          # On Windows, the ifort compiler specifies the object on the
          # command line with -object:, not -o.  Massage the necessary
          # command-line construction variables.
          for dialect in ['F77', 'F90', 'FORTRAN', 'F95']:
              for var in ['%sCOM' % dialect, '%sPPCOM' % dialect,
                          'SH%sCOM' % dialect, 'SH%sPPCOM' % dialect]:
                  env[var] = env[var].replace('-o $TARGET', '-object:$TARGET')
          env['FORTRANMODDIRPREFIX'] = "/module:"
      else:
          env['FORTRANMODDIRPREFIX'] = "-module "
function_tokens: def generate ( env ) : # ifort supports Fortran 90 and Fortran 95 # Additionally, ifort recognizes more file extensions. fscan = FortranScan ( "FORTRANPATH" ) SCons . Tool . SourceFileScanner . add_scanner ( '.i' , fscan ) SCons . Tool . SourceFileScanner . add_scanner ( '.i90' , fscan ) if 'FORTRANFILESUFFIXES' not in env : env [ 'FORTRANFILESUFFIXES' ] = [ '.i' ] else : env [ 'FORTRANFILESUFFIXES' ] . append ( '.i' ) if 'F90FILESUFFIXES' not in env : env [ 'F90FILESUFFIXES' ] = [ '.i90' ] else : env [ 'F90FILESUFFIXES' ] . append ( '.i90' ) add_all_to_env ( env ) fc = 'ifort' for dialect in [ 'F77' , 'F90' , 'FORTRAN' , 'F95' ] : env [ '%s' % dialect ] = fc env [ 'SH%s' % dialect ] = '$%s' % dialect if env [ 'PLATFORM' ] == 'posix' : env [ 'SH%sFLAGS' % dialect ] = SCons . Util . CLVar ( '$%sFLAGS -fPIC' % dialect ) if env [ 'PLATFORM' ] == 'win32' : # On Windows, the ifort compiler specifies the object on the # command line with -object:, not -o.  Massage the necessary # command-line construction variables. for dialect in [ 'F77' , 'F90' , 'FORTRAN' , 'F95' ] : for var in [ '%sCOM' % dialect , '%sPPCOM' % dialect , 'SH%sCOM' % dialect , 'SH%sPPCOM' % dialect ] : env [ var ] = env [ var ] . replace ( '-o $TARGET' , '-object:$TARGET' ) env [ 'FORTRANMODDIRPREFIX' ] = "/module:" else : env [ 'FORTRANMODDIRPREFIX' ] = "-module "