示例#1
0
def merge_default_version(env):
    version = get_default_version(env)
    arch = get_default_arch(env)

    msvs = get_vs_by_version(version)
    if msvs is None:
        return
    batfilename = msvs.get_batch_file()

    # XXX: I think this is broken. This will silently set a bogus tool instead
    # of failing, but there is no other way with the current scons tool
    # framework
    if batfilename is not None:

        vars = ('LIB', 'LIBPATH', 'PATH', 'INCLUDE')

        msvs_list = get_installed_visual_studios()
        # TODO(1.5):
        #vscommonvarnames = [ vs.common_tools_var for vs in msvs_list ]
        vscommonvarnames = map(lambda vs: vs.common_tools_var, msvs_list)
        nenv = normalize_env(env['ENV'], vscommonvarnames + ['COMSPEC'])
        output = get_output(batfilename, arch, env=nenv)
        vars = parse_output(output, vars)

        for k, v in vars.items():
            env.PrependENVPath(k, v, delete_existing=1)
示例#2
0
def merge_default_version(env):
    version = get_default_version(env)
    arch = get_default_arch(env)

    msvs = get_vs_by_version(version)
    if msvs is None:
        return
    batfilename = msvs.get_batch_file()

    # XXX: I think this is broken. This will silently set a bogus tool instead
    # of failing, but there is no other way with the current scons tool
    # framework
    if batfilename is not None:

        vars = ('LIB', 'LIBPATH', 'PATH', 'INCLUDE')

        msvs_list = get_installed_visual_studios()
        # TODO(1.5):
        #vscommonvarnames = [ vs.common_tools_var for vs in msvs_list ]
        vscommonvarnames = map(lambda vs: vs.common_tools_var, msvs_list)
        nenv = normalize_env(env['ENV'], vscommonvarnames + ['COMSPEC'])
        output = get_output(batfilename, arch, env=nenv)
        vars = parse_output(output, vars)

        for k, v in vars.items():
            env.PrependENVPath(k, v, delete_existing=1)
示例#3
0
def generate_win32(env):
    # Import here to avoid importing msvc tool on every platform
    from SCons.Tool.MSCommon.common import get_output, parse_output

    abi = get_abi(env, lang='FORTRAN')

    # Get product dir
    versdict = find_fc_versions(abi)
    vers = sorted(versdict.keys())[::-1]
    pdir = product_dir_fc(versdict[vers[0]])
    batfile = os.path.join(pdir, "bin", "ifortvars.bat")

    out = get_output(batfile, args=_ABI2BATABI[abi])
    d = parse_output(out)
    for k, v in d.items():
        env.PrependENVPath(k, v, delete_existing=True)

    return old_generate(env)
示例#4
0
def generate_win32(env):
    # Import here to avoid importing msvc tool on every platform
    from SCons.Tool.MSCommon.common import get_output, parse_output

    abi = get_abi(env, lang='FORTRAN')

    # Get product dir
    versdict = find_fc_versions(abi)
    vers = sorted(versdict.keys())[::-1]
    pdir = product_dir_fc(versdict[vers[0]])
    batfile = os.path.join(pdir, "bin", "ifortvars.bat")

    out = get_output(batfile, args=_ABI2BATABI[abi])
    d = parse_output(out)
    for k, v in d.items():
        env.PrependENVPath(k, v, delete_existing=True)

    return old_generate(env)
示例#5
0
def generate(env):
    SCons.Tool.msvc.generate(env)

    # YOYOYOY
    batfile = r"C:\Program Files (x86)\Intel\Compiler\11.1\038\bin\iclvars.bat"
    out = get_output(batfile, args=_ABI2INTEL[abi])
    d = parse_output(out)
    for k, v in d.items():
	env.PrependENVPath(k, v, delete_existing=True)

    #static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

    #for suffix in CSuffixes:
    #    static_obj.add_action(suffix, SCons.Defaults.CAction)
    #    shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
    #    static_obj.add_emitter(suffix, SCons.Defaults.StaticObjectEmitter)
    #    shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)
    env["CC"] = "icl"
    env["CFLAGS"] = SCons.Util.CLVar("/nologo")
    env["SHCC"] = "$CC"
示例#6
0
def generate(env):
    SCons.Tool.msvc.generate(env)

    # YOYOYOY
    batfile = r"C:\Program Files (x86)\Intel\Compiler\11.1\038\bin\iclvars.bat"
    out = get_output(batfile, args=_ABI2INTEL[abi])
    d = parse_output(out)
    for k, v in d.items():
        env.PrependENVPath(k, v, delete_existing=True)

        # static_obj, shared_obj = SCons.Tool.createObjBuilders(env)

        # for suffix in CSuffixes:
        #    static_obj.add_action(suffix, SCons.Defaults.CAction)
        #    shared_obj.add_action(suffix, SCons.Defaults.ShCAction)
        #    static_obj.add_emitter(suffix, SCons.Defaults.StaticObjectEmitter)
        #    shared_obj.add_emitter(suffix, SCons.Defaults.SharedObjectEmitter)
    env["CC"] = "icl"
    env["CFLAGS"] = SCons.Util.CLVar("/nologo")
    env["SHCC"] = "$CC"
示例#7
0
def generate_win32(env):
    # Import here to avoid importing msvc tool on every platform
    import SCons.Tool.msvc
    from SCons.Tool.MSCommon.common import get_output, parse_output
    SCons.Tool.msvc.generate(env)

    abi = get_abi(env)

    # Set up environment
    # XXX: detect this properly
    batfile = r"C:\Program Files (x86)\Intel\Compiler\11.1\038\bin\iclvars.bat"
    out = get_output(batfile, args=abi)
    d = parse_output(out)
    for k, v in d.items():
        env.PrependENVPath(k, v, delete_existing=True)

    env["CC"] = "icl"
    env["SHCC"] = "$CC"

    env["CXX"] = "icl"
    env["SHCXX"] = "$CXX"

    env["CCFLAGS"] = SCons.Util.CLVar("/nologo")
示例#8
0
def generate_win32(env):
    # Import here to avoid importing msvc tool on every platform
    import SCons.Tool.msvc
    from SCons.Tool.MSCommon.common import get_output, parse_output
    SCons.Tool.msvc.generate(env)

    abi = get_abi(env)

    # Set up environment
    # XXX: detect this properly
    batfile = r"C:\Program Files (x86)\Intel\Compiler\11.1\038\bin\iclvars.bat"
    out = get_output(batfile, args=abi)
    d = parse_output(out)
    for k, v in d.items():
        env.PrependENVPath(k, v, delete_existing=True)

    env["CC"] = "icl"
    env["SHCC"] = "$CC"

    env["CXX"] = "icl"
    env["SHCXX"] = "$CXX"

    env["CCFLAGS"] = SCons.Util.CLVar("/nologo")