-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
39 lines (34 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
include(RezBuild)
include(RezRepository)
include(ExternalProject)
# TBB
rez_set_archive(
TBB_URL tbb/tbb-${REZ_BUILD_PROJECT_VERSION}-lin.tgz
https://github.com/oneapi-src/oneTBB/releases/download/v${REZ_BUILD_PROJECT_VERSION}/tbb-${REZ_BUILD_PROJECT_VERSION}-lin.tgz
)
# The environment variable REZ_TMP_PATH is meant to point to a location such as "/tmp/rez".
set(EXTRACT_DIR $ENV{REZ_TMP_PATH}/tbb/${REZ_BUILD_PROJECT_VERSION})
# We configure/build/install TBB through the ExternalProject_Add macro,
# using three different shell scripts for each of these steps.
# If necessary, it is possible to skip one of these steps by replacing the command
# by "", an empty string.
ExternalProject_Add(
REZ_TBB
URL ${TBB_URL}
PREFIX tbb
SOURCE_DIR ${EXTRACT_DIR}
PATCH_COMMAND ""
UPDATE_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND bash ${CMAKE_SOURCE_DIR}/install.sh ${EXTRACT_DIR}
)
# We use a bogus CMake "install" step in order to be able to properly finish
# and get out of the CMake script.
install(
CODE
"execute_process(
COMMAND echo \"\n[CMAKE] TBB-${REZ_BUILD_PROJECT_VERSION} PACKAGE SETUP FINISHED!\n\"
)"
)