示例#1
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":
示例#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
示例#3
0
                    F77      = 'gfortran',
                    CFLAGS   = '-O3 -g',
                    CXXFLAGS = '-O3 -g',
                    LDFLAGS  = r'-Wl,-rpath,/%s' % ('a'*100),
                    MAKEOPTS='-j%s' % opt.threads,
                    DOWNLOAD_DIR = opt.download_dir,
                    BUILD_DIR    = P.join(opt.build_root, 'build'),
                    INSTALL_DIR  = P.join(opt.build_root, 'install'),
                    MISC_DIR = P.join(opt.build_root, 'misc'),
                    PATH=os.environ['PATH'],
                    **({} if opt.isisroot is None else dict(ISISROOT=opt.isisroot)))

    arch = get_platform()

    if arch.os == 'linux':
        e.append('LDFLAGS', '-Wl,-O1 -Wl,--enable-new-dtags -Wl,--hash-style=both')
    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)