Skip to content

Commit 85bcce5

Browse files
committed
Download a pre-built tbb
1 parent e46ba54 commit 85bcce5

File tree

1 file changed

+40
-7
lines changed

1 file changed

+40
-7
lines changed

CMakeLists.txt

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,40 @@ endif()
133133
set(TBB_TEST
134134
OFF
135135
CACHE BOOL "Disable TBB tests" FORCE)
136-
FetchContent_Declare(
137-
tbb
138-
GIT_REPOSITORY https://github.com/uxlfoundation/oneTBB
139-
GIT_TAG v2022.3.0)
140-
FetchContent_GetProperties(tbb)
141-
if(NOT tbb_POPULATED)
142-
FetchContent_MakeAvailable(tbb)
136+
137+
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
138+
FetchContent_Declare(
139+
tbb
140+
URL https://github.com/uxlfoundation/oneTBB/releases/download/v2022.3.0/oneapi-tbb-2022.3.0-lin.tgz
141+
DOWNLOAD_EXTRACT_TIMESTAMP true)
142+
FetchContent_GetProperties(tbb)
143+
if(NOT tbb_POPULATED)
144+
FetchContent_Populate(tbb)
145+
set(TBB_DIR ${tbb_SOURCE_DIR}/lib/cmake/tbb)
146+
find_package(TBB REQUIRED)
147+
endif()
148+
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
149+
FetchContent_Declare(
150+
tbb
151+
URL https://github.com/uxlfoundation/oneTBB/releases/download/v2022.3.0/oneapi-tbb-2022.3.0-mac.tgz
152+
DOWNLOAD_EXTRACT_TIMESTAMP true)
153+
FetchContent_GetProperties(tbb)
154+
if(NOT tbb_POPULATED)
155+
FetchContent_Populate(tbb)
156+
set(TBB_DIR ${tbb_SOURCE_DIR}/lib/cmake/tbb)
157+
find_package(TBB REQUIRED)
158+
endif()
159+
elseif(WIN32)
160+
FetchContent_Declare(
161+
tbb
162+
URL https://github.com/uxlfoundation/oneTBB/releases/download/v2022.3.0/oneapi-tbb-2022.3.0-win.zin
163+
DOWNLOAD_EXTRACT_TIMESTAMP true)
164+
FetchContent_GetProperties(tbb)
165+
if(NOT tbb_POPULATED)
166+
FetchContent_Populate(tbb)
167+
set(TBB_DIR ${tbb_SOURCE_DIR}/lib/cmake/tbb)
168+
find_package(TBB REQUIRED)
169+
endif()
143170
endif()
144171

145172
add_library(dsf STATIC ${SOURCES})
@@ -177,6 +204,12 @@ install(
177204
if(BUILD_PYTHON_BINDINGS)
178205
include(FetchContent)
179206

207+
# Check if Doxygen is available for documentation generation
208+
find_package(Doxygen REQUIRED)
209+
if(NOT DOXYGEN_FOUND)
210+
message(FATAL_ERROR "Doxygen is required to build the docstrings.")
211+
endif()
212+
180213
# Get pybind11
181214
FetchContent_Declare(
182215
pybind11

0 commit comments

Comments
 (0)