⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 intel-win.jam

📁 C++的一个好库。。。现在很流行
💻 JAM
字号:
# Copyright Vladimir Prus 2004.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt
# or copy at http://www.boost.org/LICENSE_1_0.txt)

import toolset ;
import feature ;
import toolset : flags ;
import os ;

# This is needed because the rule we import here depend on 'common'
# That's nasty.
import common ;

import intel ;

feature.extend-subfeature toolset intel : platform : win ;

import msvc ;
toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
toolset.inherit-flags intel-win : msvc ;
toolset.inherit-rules intel-win : msvc ;

# Initializes the intel toolset for windows
rule init ( version ? :     # the compiler version
            command * :     # the command to invoke the compiler itself
            options *       # Additional option: <compatibility>
                            # either 'vc6', 'vc7', 'vc7.1'
                            # or 'native'(default).
          )
{           
    local compatibility = 
      [ feature.get-values <compatibility> : $(options) ] ;
    local condition = [  common.check-init-parameters intel-win
        : version $(version) : compatibility $(compatibility) ] ;
    
    command = [ common.get-invocation-command intel-win : icc.exe :
        $(command) ] ;    
    
    common.handle-options intel-win : $(condition) : $(command) : $(options) ;

    local root = [ common.get-absolute-tool-path $(command[-1]) ] ;
    
    local setup ;
    setup = $(root)/iclvars.bat ;
    setup = "call \""$(setup)"\" > nul " ;
        
    if [ os.name ] = NT
    {
        setup = $(setup)"
" ;
    }
    else
    {
        setup = "cmd /S /C "$(setup)" \"&&\" " ;
    }
    
    
    flags intel-win.compile .CC $(condition) : $(setup)icl ; 
    flags intel-win.link .LD $(condition) : $(setup)xilink ; 
    flags intel-win.archive .LD $(condition) : $(setup)xilink ;       
    
    local m = [ MATCH (.).* : $(version) ] ;
    local major = $(m[1]) ;

    local C++FLAGS ;
    # Reduce the number of spurious error messages
    C++FLAGS += /Qwn5 /Qwd985 ;

    # Enable ADL
    C++FLAGS += -Qoption,c,--arg_dep_lookup ; #"c" works for C++, too

    if $(major) > 5
    {
        C++FLAGS += /Zc:forScope ;  # Add support for correct for loop scoping
    }

    # Add options recognized only by intel7
    if $(major) >= 7
    {
        C++FLAGS += /Qansi_alias ;
    }
    
    if $(compatibility) = vc6
    {
        C++FLAGS += 
          # Emulate VC6
          /Qvc6
      
          # no wchar_t support in vc6 dinkum library.  Furthermore, in vc6
          # compatibility-mode, wchar_t is not a distinct type from unsigned
          # short
          -DBOOST_NO_INTRINSIC_WCHAR_T
          ; 
    }
    else
    {
        if $(major) > 5
        {
            # Add support for wchar_t
            C++FLAGS += /Zc:wchar_t
              # Tell the dinkumware library about it.
              -D_NATIVE_WCHAR_T_DEFINED
              ;
        }
    }        
    if $(compatibility) && $(compatibility) != native
    {        
        C++FLAGS += /Q$(base-vc) ;
    }
    else        
    {
        C++FLAGS += 
          -Qoption,cpp,--arg_dep_lookup
          -Qoption,cpp,--const_string_literals
          -Qoption,cpp,--new_for_init
          -Qoption,cpp,--no_implicit_typename
          -Qoption,cpp,--no_friend_injection
          -Qoption,cpp,--no_microsoft_bugs
          ;
    }
    
    flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
    
}

flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -