Skip to content

Commit

Permalink
Add oneDPL, also use oneTBB fork with CMake fix until next release
Browse files Browse the repository at this point in the history
  • Loading branch information
lkeegan committed Nov 9, 2023
1 parent 8ecb99a commit 3ec3044
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ env:
SPDLOG_VERSION: "v1.12.0"
LIBTIFF_VERSION: "v4.6.0"
FMT_VERSION: "10.1.1"
TBB_VERSION: "v2021.10.0"
TBB_VERSION: "fix_1145_missing_threads_dependency_static_build"
DPL_VERSION: "oneDPL-2022.2.0-rc1"
OPENCV_VERSION: "4.8.1"
CATCH2_VERSION: "v3.4.0"
BENCHMARK_VERSION: "v1.8.3"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ This repo provides the following statically compiled libraries:
- [spdlog](https://github.com/gabime/spdlog)
- [libTIFF](http://www.libtiff.org/)
- [fmt](https://fmt.dev/)
- [tbb](https://github.com/intel/tbb)
- [oneTBB](https://github.com/oneapi-src/oneTBB)
- [oneDPL](https://github.com/oneapi-src/oneDPL)
- [opencv](https://github.com/opencv/opencv)
- [catch2](https://github.com/catchorg/Catch2)
- [benchmark](https://github.com/google/benchmark)
Expand Down
29 changes: 24 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ echo "SPDLOG_VERSION: ${SPDLOG_VERSION}"
echo "LIBTIFF_VERSION: ${LIBTIFF_VERSION}"
echo "FMT_VERSION: ${FMT_VERSION}"
echo "TBB_VERSION: ${TBB_VERSION}"
echo "TBB_EXTRA_FLAGS: ${TBB_EXTRA_FLAGS}"
echo "OPENCV_VERSION: ${OPENCV_VERSION}"
echo "CATCH2_VERSION: ${CATCH2_VERSION}"
echo "BENCHMARK_VERSION: ${BENCHMARK_VERSION}"
Expand Down Expand Up @@ -285,17 +284,19 @@ time make -j$NPROCS
$SUDOCMD make install
cd ../../

# build static version of tbb
git clone -b $TBB_VERSION --depth 1 https://github.com/intel/tbb.git
# build static version of oneTBB
# use temporary fork until https://github.com/oneapi-src/oneTBB/pull/1248 is merged & included in a release
# upstream repo is oneapi-src
git clone -b $TBB_VERSION --depth 1 https://github.com/lkeegan/oneTBB.git
cd tbb
mkdir build
cd build
cmake -G "Unix Makefiles" .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden ${TBB_EXTRA_FLAGS}" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden ${TBB_EXTRA_FLAGS}" \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DTBB_ENABLE_IPO="$TBB_ENABLE_IPO" \
-DTBB_STRICT=OFF \
Expand All @@ -305,6 +306,24 @@ VERBOSE=1 time make tbb -j$NPROCS
$SUDOCMD make install
cd ../../

# build static version of oneDPL
git clone -b $DPL_VERSION --depth 1 https://github.com/oneapi-src/oneDPL
cd oneDPL
mkdir build
cd build
cmake -G "Unix Makefiles" .. \
-DCMAKE_OSX_DEPLOYMENT_TARGET="${MACOSX_DEPLOYMENT_TARGET}" \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_CXX_FLAGS="-fpic -fvisibility=hidden" \
-DCMAKE_PREFIX_PATH="$INSTALL_PREFIX" \
-DCMAKE_INSTALL_PREFIX="$INSTALL_PREFIX" \
-DONEDPL_BACKEND="tbb"
make
$SUDOCMD make install
cd ../../

# build static version of pagmo
git clone -b $PAGMO_VERSION --depth 1 https://github.com/esa/pagmo2.git
cd pagmo2
Expand Down

0 comments on commit 3ec3044

Please sign in to comment.