Skip to content

Commit f4f3442

Browse files
committed
ENH: Rename file with lowercase tbb for consistency
Match the Slicer convention for tbb and make the file lowercase.
1 parent 4aa3b24 commit f4f3442

File tree

1 file changed

+16
-29
lines changed

1 file changed

+16
-29
lines changed

SuperBuild/External_TBB.cmake renamed to SuperBuild/External_tbb.cmake

Lines changed: 16 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ if(NOT DEFINED TBB_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
2121

2222
if(NOT DEFINED git_protocol)
2323
set(git_protocol "https")
24+
set(tbb_ver "v2022.2.0-rc1")
2425
endif()
2526

2627
ExternalProject_SetIfNotDefined(
@@ -73,50 +74,36 @@ if(NOT DEFINED TBB_DIR AND NOT ${CMAKE_PROJECT_NAME}_USE_SYSTEM_${proj})
7374
)
7475

7576
message(STATUS "Building ${proj} against TBB_DIR:${TBB_DIR}:")
76-
ExternalProject_GenerateProjectDescription_Step(${proj})
77-
7877
set(TBB_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/TBB)
79-
#${CMAKE_BINARY_DIR}/${proj}-${EXTERNAL_PROJECT_BUILD_TYPE}-build)
78+
ExternalProject_GenerateProjectDescription_Step(${proj}
79+
VERSION ${tbb_ver}
80+
LICENSE_FILES "https://raw.githubusercontent.com/oneapi-src/oneTBB/v${tbb_ver}/LICENSE.txt"
81+
)
8082

8183
#-----------------------------------------------------------------------------
8284
# Launcher setting specific to build tree
8385

84-
set(_lib_subdir lib)
85-
if(WIN32)
86-
set(_lib_subdir bin)
87-
endif()
88-
89-
# library paths
90-
set(${proj}_LIBRARY_PATHS_LAUNCHER_BUILD ${TBB_DIR}/${_lib_subdir}/<CMAKE_CFG_INTDIR>)
86+
set(${proj}_LIBRARY_PATHS_LAUNCHER_BUILD "${TBB_BIN_DIR}")
9187
mark_as_superbuild(
9288
VARS ${proj}_LIBRARY_PATHS_LAUNCHER_BUILD
9389
LABELS "LIBRARY_PATHS_LAUNCHER_BUILD"
9490
)
9591

96-
if(Slicer_BUILD_TBBPython)
97-
# pythonpath
98-
set(${proj}_PYTHONPATH_LAUNCHER_BUILD
99-
${TBB_DIR}/Wrapping/Generators/Python/<CMAKE_CFG_INTDIR>
100-
${TBB_DIR}/lib/<CMAKE_CFG_INTDIR>
101-
${TBB_DIR}/lib
102-
)
103-
mark_as_superbuild(
104-
VARS ${proj}_PYTHONPATH_LAUNCHER_BUILD
105-
LABELS "PYTHONPATH_LAUNCHER_BUILD"
106-
)
107-
endif()
108-
109-
#-----------------------------------------------------------------------------
110-
# Launcher setting specific to install tree
111-
112-
# Since TBB Wrapping is installed in the Slicer standard site-packages
113-
# location, there is no need to specify custom setting for the install
114-
# case.
92+
set(TBB_DIR ${TBB_INSTALL_DIR}/lib/cmake/tbb)
11593

11694
else()
95+
# The project is provided using TBB_DIR, nevertheless since other project may depend on TBB,
96+
# let's add an 'empty' one
11797
ExternalProject_Add_Empty(${proj} DEPENDS ${${proj}_DEPENDENCIES})
11898
endif()
11999

100+
mark_as_superbuild(
101+
VARS
102+
TBB_BIN_DIR:PATH
103+
TBB_LIB_DIR:PATH
104+
)
105+
106+
ExternalProject_Message(${proj} "TBB_DIR:${TBB_DIR}")
120107
mark_as_superbuild(
121108
VARS TBB_DIR:PATH
122109
LABELS "FIND_PACKAGE"

0 commit comments

Comments
 (0)