示例#1
0
    if 'gcc' in build_env['CC']:
        output = output.lower()
        if "llvm" in output or "clang" in output:
            die('Your compiler is an LLVM-GCC hybrid. It is our experience that these tools can not compile Vision Workbench and Stereo Pipeline correctly. Please change your compiler choice.'
                )

    if arch.os == 'linux':
        ver1 = get_prog_version(build_env['CC'])
        ver2 = get_prog_version(build_env['CXX'])
        if ver1 < MIN_CC_VERSION or ver2 < MIN_CC_VERSION:
            die('Expecting gcc and g++ version >= ' + str(MIN_CC_VERSION))

    if arch.os == 'linux':
        build_env.append(
            'LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
        build_env.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    elif arch.os == 'osx':
        build_env.append('LDFLAGS', '-Wl,-headerpad_max_install_names')
        osx_arch = 'x86_64'  #SEMICOLON-DELIMITED

        ver = version.StrictVersion(arch.dist_version)

        # Transform 10.8.5 into 10.8
        ver_arr = str(ver).split(".")
        ver_arr = ver_arr[0:2]
        ver2 = ".".join(ver_arr)

        # Define SDK location. This moved in OSX 10.8
        sysroot = '/Developer/SDKs/MacOSX%s.sdk' % opt.osx_sdk
        if ver >= "10.8":
示例#2
0
    # Check compiler version for compilers we hate
    output = run(build_env['CC'],'--version')
    if 'gcc' in build_env['CC']:
        output = output.lower()
        if "llvm" in output or "clang" in output:
            die('Your compiler is an LLVM-GCC hybrid. It is our experience that these tools can not compile Vision Workbench and Stereo Pipeline correctly. Please change your compiler choice.')

    if arch.os == 'linux':
        ver1 = get_prog_version(build_env['CC'])
        ver2 = get_prog_version(build_env['CXX'])
        if ver1 < MIN_CC_VERSION or ver2 < MIN_CC_VERSION:
            die('Expecting gcc and g++ version >= ' + str(MIN_CC_VERSION))

    if arch.os == 'linux':
        build_env.append('LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
        build_env.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    elif arch.os == 'osx':
        build_env.append('LDFLAGS', '-Wl,-headerpad_max_install_names')
        osx_arch = 'x86_64' #SEMICOLON-DELIMITED

        ver = version.StrictVersion(arch.dist_version)

        # Transform 10.8.5 into 10.8
        ver_arr = str(ver).split("."); ver_arr = ver_arr[0:2]
        ver2 = ".".join(ver_arr)

        # Define SDK location. This moved in OSX 10.8
        sysroot = '/Developer/SDKs/MacOSX%s.sdk' % opt.osx_sdk
        if ver >= "10.8":
            sysroot = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX%s.sdk' % ver2
示例#3
0
        keywords = output.split()
        version_string = keywords[keywords.index('version') + 1]
        if version.StrictVersion(version_string) < "3.1":
            die('Your Clang compiler is older than 3.1. It is our experience that older versions of clang could not compile Vision Workbench and Stereo Pipeline correctly. Please change your compiler choice.'
                )

    if arch.os == 'linux':
        ver1 = get_prog_version(build_env['CC'])
        ver2 = get_prog_version(build_env['CXX'])
        if ver1 < MIN_CC_VERSION or ver2 < MIN_CC_VERSION:
            die('Expecting gcc and g++ version >= ' + str(MIN_CC_VERSION))

    if arch.os == 'linux':
        build_env.append(
            'LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
        build_env.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    elif arch.os == 'osx':
        build_env.append('LDFLAGS', '-Wl,-headerpad_max_install_names')
        osx_arch = 'x86_64'  #SEMICOLON-DELIMITED

        ver = version.StrictVersion(arch.dist_version)

        # Transform 10.8.5 into 10.8
        ver_arr = str(ver).split(".")
        ver_arr = ver_arr[0:2]
        ver2 = ".".join(ver_arr)

        # Define SDK location. This moved in OSX 10.8
        sysroot = '/Developer/SDKs/MacOSX%s.sdk' % opt.osx_sdk
        if ver >= "10.8":
示例#4
0
    elif arch.os == 'osx':
        e.append('LDFLAGS', '-Wl,-headerpad_max_install_names')

        # ISIS only supports 32-bit
        osx_arch = 'i386' #SEMICOLON-DELIMITED
        # We're targeting 10.5
        target = '10.5'
        # And also using the matching sdk for good measure
        sysroot = '/Developer/SDKs/MacOSX%s.sdk' % target

        # CMake needs these vars to not screw things up.
        e.append('OSX_SYSROOT', sysroot)
        e.append('OSX_ARCH', osx_arch)
        e.append('OSX_TARGET', target)

        e.append_many(ALL_FLAGS, ' '.join(['-arch ' + i for i in osx_arch.split(';')]))
        e.append_many(ALL_FLAGS, '-mmacosx-version-min=%s -isysroot %s' % (target, sysroot))

        # Resolve a bug with -mmacosx-version-min on 10.6 (see
        # http://markmail.org/message/45nbrtxsxvsjedpn).
        # Short version: 10.6 generates the new compact header (LD_DYLD_INFO)
        # even when told to support 10.5 (which can't read it)
        if version.StrictVersion(arch.dist_version) >= '10.6':
            e.append('LDFLAGS', '-Wl,-no_compact_linkedit')

    e.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    if arch.osbits == 'linux32':
        limit_symbols = P.join(P.abspath(P.dirname(__file__)), 'glibc24.h')
        e.append('CPPFLAGS', '-include %s' % limit_symbols)
示例#5
0
    elif 'clang' in build_env['CC']:
        output = output.lower()
        keywords = output.split()
        version_string = keywords[keywords.index('version')+1]
        if version.StrictVersion(version_string) < "3.1":
            die('Your Clang compiler is older than 3.1. It is our experience that older versions of clang could not compile Vision Workbench and Stereo Pipeline correctly. Please change your compiler choice.')

    if arch.os == 'linux':
        ver1 = get_prog_version(build_env['CC'])
        ver2 = get_prog_version(build_env['CXX'])
        if ver1 < MIN_CC_VERSION or ver2 < MIN_CC_VERSION:
            die('Expecting gcc and g++ version >= ' + str(MIN_CC_VERSION))

    if arch.os == 'linux':
        build_env.append('LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
        build_env.append_many(ALL_FLAGS, '-m%i' % arch.bits)

    elif arch.os == 'osx':
        build_env.append('LDFLAGS', '-Wl,-headerpad_max_install_names')
        osx_arch = 'x86_64' #SEMICOLON-DELIMITED

        ver = version.StrictVersion(arch.dist_version)

        # Transform 10.8.5 into 10.8
        ver_arr = str(ver).split("."); ver_arr = ver_arr[0:2]
        ver2 = ".".join(ver_arr)

        # Define SDK location. This moved in OSX 10.8
        sysroot = '/Developer/SDKs/MacOSX%s.sdk' % opt.osx_sdk
        if ver >= "10.8":
            sysroot = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX%s.sdk' % ver2