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

📄 msvc.jam

📁 Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work
💻 JAM
📖 第 1 页 / 共 4 页
字号:
            errors.error "MSVC toolset configuration: Toolset version"                "'$(version)' already configured." ;        }    }    else    {        # Register a new configuration.        $(.versions).register $(version) ;        # Add user-supplied to auto-detected options.        options = [ $(.versions).get $(version) : options ] $(options) ;        # Mark the configuration as 'used'.        $(.versions).use $(version) ;        # Generate conditions and save them.        local conditions = [ common.check-init-parameters msvc : version $(v) ]            ;        $(.versions).set $(version) : conditions : $(conditions) ;        local command = [ feature.get-values <command> : $(options) ] ;        # If version is specified, we try to search first in default paths, and        # only then in PATH.        command = [ common.get-invocation-command msvc : cl.exe : $(command) :            [ default-paths $(version) ] : $(version) ] ;        common.handle-options msvc : $(conditions) : $(command) : $(options) ;        if ! $(version)        {            # Even if version is not explicitly specified, try to detect the            # version from the path.            # FIXME: We currently detect both Microsoft Visual Studio 9.0 and            # 9.0express as 9.0 here.            if [ MATCH "(Microsoft Visual Studio 9)" : $(command) ]            {                version = 9.0 ;            }            if [ MATCH "(Microsoft Visual Studio 8)" : $(command) ]            {                version = 8.0 ;            }            else if [ MATCH "(NET 2003[\/\\]VC7)" : $(command) ]            {                version = 7.1 ;            }            else if [ MATCH "(Microsoft Visual C\\+\\+ Toolkit 2003)" :                $(command) ]            {                version = 7.1toolkit ;            }            else if [ MATCH "(.NET[\/\\]VC7)" : $(command) ]            {                version = 7.0 ;            }            else            {                version = 6.0 ;            }        }        # Generate and register setup command.        local below-8.0 = [ MATCH ^([67]\\.) : $(version) ] ;        local cpu = i386 amd64 ia64 ;        if $(below-8.0)        {            cpu = i386 ;        }        local setup-amd64 ;        local setup-i386 ;        local setup-ia64 ;        if $(command)        {            # TODO: Note that if we specify a non-existant toolset version then            # this rule may find and use a corresponding compiler executable            # belonging to an incorrect toolset version. For example, if you            # have only MSVC 7.1 installed, have its executable on the path and            # specify you want Boost Build to use MSVC 9.0, then you want Boost            # Build to report an error but this may cause it to silently use the            # MSVC 7.1 compiler even though it thinks it is using the msvc-9.0            # toolset version.            command = [ common.get-absolute-tool-path $(command[-1]) ] ;            local parent = [ path.make $(command) ] ;            parent = [ path.parent $(parent) ] ;            parent = [ path.native $(parent) ] ;            # Setup will be used if the command name has been specified. If            # setup is not specified explicitly then a default setup script will            # be used instead. Setup scripts may be global or arhitecture/            # /platform/cpu specific. Setup options are used only in case of            # global setup scripts.            # Default setup scripts provided with different VC distributions:            #            #   VC 7.1 had only the vcvars32.bat script specific to 32 bit i386            # builds. It was located in the bin folder for the regular version            # and in the root folder for the free VC 7.1 tools.            #            #   Later 8.0 & 9.0 versions introduce separate platform specific            # vcvars*.bat scripts (e.g. 32 bit, 64 bit AMD or 64 bit Itanium)            # located in or under the bin folder. Most also include a global            # vcvarsall.bat helper script located in the root folder which runs            # one of the aforementioned vcvars*.bat scripts based on the options            # passed to it. So far only the version coming with some PlatformSDK            # distributions does not include this top level script but to            # support those we need to fall back to using the worker scripts            # directly in case the top level script can not be found.            local global-setup = [ feature.get-values <setup> : $(options) ] ;            global-setup = $(global-setup[1]) ;            if ! $(below-8.0)            {                global-setup ?= [ locate-default-setup $(command) : $(parent) :                    vcvarsall.bat ] ;            }            local default-setup-amd64 = vcvarsx86_amd64.bat ;            local default-setup-i386  = vcvars32.bat ;            local default-setup-ia64  = vcvarsx86_ia64.bat ;            # http://msdn2.microsoft.com/en-us/library/x4d2c09s(VS.80).aspx and            # http://msdn2.microsoft.com/en-us/library/x4d2c09s(vs.90).aspx            # mention an x86_IPF option, that seems to be a documentation bug            # and x86_ia64 is the correct option.            local default-global-setup-options-amd64 = x86_amd64 ;            local default-global-setup-options-i386  = x86 ;            local default-global-setup-options-ia64  = x86_ia64 ;            # When using 64-bit Windows, and targeting 64-bit, it is possible to            # use a native 64-bit compiler, selected by the "amd64" & "ia64"            # parameters to vcvarsall.bat. There are two variables we can use --            # PROCESSOR_ARCHITECTURE and PROCESSOR_IDENTIFIER. The first is            # 'x86' when running 32-bit Windows, no matter which processor is            # used, and 'AMD64' on 64-bit windows on x86 (either AMD64 or EM64T)            # Windows.            #            if [ MATCH ^(AMD64) : [ os.environ PROCESSOR_ARCHITECTURE ] ]            {                default-global-setup-options-amd64 = amd64 ;            }            # TODO: The same 'native compiler usage' should be implemented for            # the Itanium platform by using the "ia64" parameter. For this            # though we need someone with access to this platform who can find            # out how to correctly detect this case.            else if $(somehow-detect-the-itanium-platform)            {                default-global-setup-options-ia64 = ia64 ;            }            local setup-prefix = "call " ;            local setup-suffix = " >nul"$(.nl) ;            if ! [ os.name ] in NT            {                setup-prefix = "cmd.exe /S /C call " ;                setup-suffix = " \">nul\" \"&&\" " ;            }            for local c in $(cpu)            {                local setup-options ;                setup-$(c) = [ feature.get-values <setup-$(c)> : $(options) ] ;                if ! $(setup-$(c))-is-not-empty                {                    if $(global-setup)-is-not-empty                    {                        setup-$(c) = $(global-setup) ;                        # If needed we can easily add using configuration flags                        # here for overriding which options get passed to the                        # global setup command for which target platform:                        # setup-options = [ feature.get-values <setup-options-$(c)> : $(options) ] ;                        setup-options ?= $(default-global-setup-options-$(c)) ;                    }                    else                    {                        setup-$(c) = [ locate-default-setup $(command) : $(parent) : $(default-setup-$(c)) ] ;                    }                }                # Cygwin to Windows path translation.                setup-$(c) = "\""$(setup-$(c):W)"\"" ;                # Append setup options to the setup name and add the final setup                # prefix & suffix.                setup-options ?= "" ;                setup-$(c) = $(setup-prefix)$(setup-$(c):J=" ")" "$(setup-options:J=" ")$(setup-suffix) ;            }        }        # Get tool names (if any) and finish setup.        compiler = [ feature.get-values <compiler> : $(options) ] ;        compiler ?= cl ;        linker = [ feature.get-values <linker> : $(options) ] ;        linker ?= link ;        resource-compiler = [ feature.get-values <resource-compiler> : $(options) ] ;        resource-compiler ?= rc ;        assembler = [ feature.get-values <assembler> : $(options) ] ;        assembler ?= ml ;        idl-compiler = [ feature.get-values <idl-compiler> : $(options) ] ;        idl-compiler ?= midl ;        mc-compiler = [ feature.get-values <mc-compiler> : $(options) ] ;        mc-compiler ?= mc ;        manifest-tool = mt ;        local cc-filter = [ feature.get-values <compiler-filter> : $(options) ] ;        for local c in $(cpu)        {            # Setup script is not required in some configurations.            setup-$(c) ?= "" ;            local cpu-conditions = $(conditions)/$(.cpu-arch-$(c)) ;            if $(.debug-configuration)            {                for local cpu-condition in $(cpu-conditions)                {                    ECHO "notice: [msvc-cfg] condition: '$(cpu-condition)', setup: '$(setup-$(c))'" ;                }            }            toolset.flags msvc.compile .CC  $(cpu-conditions) : $(setup-$(c))$(compiler) /Zm800 -nologo ;            toolset.flags msvc.compile .RC  $(cpu-conditions) : $(setup-$(c))$(resource-compiler) ;            toolset.flags msvc.compile .ASM $(cpu-conditions) : $(setup-$(c))$(assembler) ;            toolset.flags msvc.link    .LD  $(cpu-conditions) : $(setup-$(c))$(linker) /NOLOGO /INCREMENTAL:NO ;            toolset.flags msvc.archive .LD  $(cpu-conditions) : $(setup-$(c))$(linker) /lib /NOLOGO  ;            toolset.flags msvc.compile .IDL $(cpu-conditions) : $(setup-$(c))$(idl-compiler) ;            toolset.flags msvc.compile .MC  $(cpu-conditions) : $(setup-$(c))$(mc-compiler) ;            if ! [ os.name ] in NT            {                toolset.flags msvc.link .MT $(cpu-conditions) : $(setup-$(c))$(manifest-tool) -nologo ;            }            else            {                toolset.flags msvc.link .MT $(cpu-conditions) : $(manifest-tool) -nologo ;            }            if $(cc-filter)            {                toolset.flags msvc .CC.FILTER $(cpu-conditions) : "|" $(cc-filter) ;            }        }        # Set version-specific flags.        configure-version-specific msvc : $(version) : $(conditions) ;    }}# Returns the default installation path for the given version.#local rule default-path ( version ){    # Use auto-detected path if possible.    local path = [ feature.get-values <command> : [ $(.versions).get $(version)        : options ] ] ;    if $(path)    {        path = $(path:D) ;    }    else    {        # Check environment.        if $(.version-$(version)-env)        {            local vc-path = [ os.environ $(.version-$(version)-env) ] ;            if $(vc-path)            {                vc-path = [ path.make $(vc-path) ] ;                vc-path = [ path.join $(vc-path) $(.version-$(version)-envpath) ] ;                vc-path = [ path.native $(vc-path) ] ;                path = $(vc-path) ;            }        }        # Check default path.        if ! $(path) && $(.version-$(version)-path)        {            path = [ path.native [ path.join $(.ProgramFiles) $(.version-$(version)-path) ] ] ;        }    }    return $(path) ;}# Returns either the default installation path (if 'version' is not empty) or# list of all known default paths (if no version is given)

⌨️ 快捷键说明

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