diff options
Diffstat (limited to 'build_files/build_environment')
-rw-r--r-- | build_files/build_environment/cmake/tbb.cmake | 10 | ||||
-rw-r--r-- | build_files/build_environment/cmake/versions.cmake | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/build_files/build_environment/cmake/tbb.cmake b/build_files/build_environment/cmake/tbb.cmake index c4055d55648..fa5c9029ed0 100644 --- a/build_files/build_environment/cmake/tbb.cmake +++ b/build_files/build_environment/cmake/tbb.cmake @@ -23,6 +23,14 @@ set(TBB_EXTRA_ARGS -DTBB_BUILD_STATIC=On ) +if(TBB_VERSION MATCHES 2018) + set(TBB_VS_VERSION vs2013) +elseif(TBB_VERSION MATCHES 2017) + set(TBB_VS_VERSION vs2012) +else() + set(TBB_VS_VERSION vs2010) +endif() + # CMake script for TBB from https://github.com/wjakob/tbb/blob/master/CMakeLists.txt ExternalProject_Add(external_tbb URL ${TBB_URI} @@ -30,7 +38,7 @@ ExternalProject_Add(external_tbb URL_HASH MD5=${TBB_HASH} PREFIX ${BUILD_DIR}/tbb PATCH_COMMAND COMMAND ${CMAKE_COMMAND} -E copy ${PATCH_DIR}/cmakelists_tbb.txt ${BUILD_DIR}/tbb/src/external_tbb/CMakeLists.txt && - ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/vs2010/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver + ${CMAKE_COMMAND} -E copy ${BUILD_DIR}/tbb/src/external_tbb/build/${TBB_VS_VERSION}/version_string.ver ${BUILD_DIR}/tbb/src/external_tbb/src/tbb/version_string.ver CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/tbb ${DEFAULT_CMAKE_FLAGS} ${TBB_EXTRA_ARGS} INSTALL_DIR ${LIBDIR}/tbb ) diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index e53beeddf4a..a4aed76ee5e 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -137,9 +137,16 @@ set(PYTHON_SHORT_VERSION_NO_DOTS 36) set(PYTHON_URI https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz) set(PYTHON_HASH 2c68846471994897278364fc18730dd9) -set(TBB_VERSION 44_20160128) -set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz) -set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc) +if(UNIX AND NOT APPLE) + # Needed to be compatible with GCC 7, other platforms can upgrade later + set(TBB_VERSION 2017_U7) + set(TBB_URI https://github.com/01org/tbb/archive/${TBB_VERSION}.tar.gz) + set(TBB_HASH 364f2a4b80e978f38a69cbf7c466b898) +else() + set(TBB_VERSION 44_20160128) + set(TBB_URI https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb${TBB_VERSION}oss_src_0.tgz) + set(TBB_HASH 9d8a4cdf43496f1b3f7c473a5248e5cc) +endif() set(OPENVDB_VERSION 3.1.0) set(OPENVDB_URI https://github.com/dreamworksanimation/openvdb/archive/v${OPENVDB_VERSION}.tar.gz) |