Skip to content

Commit 9ecf24a

Browse files
committed
STYLE: Move TBB variable setting local to where it was needed.
1 parent 4c13424 commit 9ecf24a

1 file changed

Lines changed: 12 additions & 13 deletions

File tree

CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@ message(STATUS "SuperBuild - ITKPythonPackage_WHEEL_NAME:${ITKPythonPackage_WHEE
1717

1818
option(ITKPythonPackage_USE_TBB "Build and use oneTBB in the ITK python package" ON)
1919

20-
if(ITK_SOURCE_DIR)
21-
set(TBB_DIR "${ITK_SOURCE_DIR}/../oneTBB-prefix/lib/cmake/TBB")
22-
else()
23-
set(TBB_DIR "${CMAKE_BINARY_DIR}/../oneTBB-prefix/lib/cmake/TBB")
24-
endif()
25-
set(tbb_args )
26-
if(ITKPythonPackage_USE_TBB)
27-
set(tbb_args
28-
-DModule_ITKTBB:BOOL=ON
29-
-DTBB_DIR:PATH=${TBB_DIR}
30-
)
31-
endif()
32-
3320
if(ITKPythonPackage_SUPERBUILD)
3421

3522
#-----------------------------------------------------------------------------
@@ -111,6 +98,18 @@ if(ITKPythonPackage_SUPERBUILD)
11198
endif()
11299

113100
if(ITKPythonPackage_USE_TBB)
101+
if(ITK_SOURCE_DIR)
102+
set(TBB_DIR "${ITK_SOURCE_DIR}/../oneTBB-prefix/lib/cmake/TBB")
103+
else()
104+
set(TBB_DIR "${CMAKE_BINARY_DIR}/../oneTBB-prefix/lib/cmake/TBB")
105+
endif()
106+
set(tbb_args )
107+
if(ITKPythonPackage_USE_TBB)
108+
set(tbb_args
109+
-DModule_ITKTBB:BOOL=ON
110+
-DTBB_DIR:PATH=${TBB_DIR}
111+
)
112+
endif()
114113

115114
set(tbb_cmake_cache_args)
116115
if(CMAKE_OSX_DEPLOYMENT_TARGET)

0 commit comments

Comments
 (0)