Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f44a0960
Commit
f44a0960
authored
Mar 24, 2020
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16894 from alalek:update_tbb
parents
b1ed003d
fa002bde
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+20
-6
No files found.
3rdparty/tbb/CMakeLists.txt
View file @
f44a0960
#Cross compile TBB from source
#Cross compile TBB from source
project
(
tbb
)
project
(
tbb
CXX
)
if
(
WIN32 AND NOT ARM
)
if
(
WIN32 AND NOT ARM
)
message
(
FATAL_ERROR
"BUILD_TBB option supports Windows on ARM only!
\n
Use regular official TBB build instead of the BUILD_TBB option!"
)
message
(
FATAL_ERROR
"BUILD_TBB option supports Windows on ARM only!
\n
Use regular official TBB build instead of the BUILD_TBB option!"
)
endif
()
endif
()
ocv_update
(
OPENCV_TBB_RELEASE
"v2020.
0
"
)
ocv_update
(
OPENCV_TBB_RELEASE
"v2020.
1
"
)
ocv_update
(
OPENCV_TBB_RELEASE_MD5
"
5858dd01ec007c139d5d178b21e06dae
"
)
ocv_update
(
OPENCV_TBB_RELEASE_MD5
"
734f335d06ee80a7d4a20cc0da734c59
"
)
ocv_update
(
OPENCV_TBB_FILENAME
"
${
OPENCV_TBB_RELEASE
}
.tar.gz"
)
ocv_update
(
OPENCV_TBB_FILENAME
"
${
OPENCV_TBB_RELEASE
}
.tar.gz"
)
string
(
REGEX REPLACE
"^v"
""
OPENCV_TBB_RELEASE_
"
${
OPENCV_TBB_RELEASE
}
"
)
string
(
REGEX REPLACE
"^v"
""
OPENCV_TBB_RELEASE_
"
${
OPENCV_TBB_RELEASE
}
"
)
ocv_update
(
OPENCV_TBB_SUBDIR
"tbb-
${
OPENCV_TBB_RELEASE_
}
"
)
#ocv_update(OPENCV_TBB_SUBDIR ...
)
set
(
tbb_src_dir
"
${
OpenCV_BINARY_DIR
}
/3rdparty/tbb"
)
set
(
tbb_src_dir
"
${
OpenCV_BINARY_DIR
}
/3rdparty/tbb"
)
ocv_download
(
FILENAME
${
OPENCV_TBB_FILENAME
}
ocv_download
(
FILENAME
${
OPENCV_TBB_FILENAME
}
...
@@ -25,6 +25,16 @@ ocv_download(FILENAME ${OPENCV_TBB_FILENAME}
...
@@ -25,6 +25,16 @@ ocv_download(FILENAME ${OPENCV_TBB_FILENAME}
if
(
NOT res
)
if
(
NOT res
)
return
()
return
()
endif
()
endif
()
if
(
OPENCV_TBB_SUBDIR
)
# use current value
ocv_assert
(
EXISTS
"
${
tbb_src_dir
}
/
${
OPENCV_TBB_SUBDIR
}
"
)
elseif
(
EXISTS
"
${
tbb_src_dir
}
/oneTBB-
${
OPENCV_TBB_RELEASE_
}
"
)
set
(
OPENCV_TBB_SUBDIR
"oneTBB-
${
OPENCV_TBB_RELEASE_
}
"
)
elseif
(
EXISTS
"
${
tbb_src_dir
}
/tbb-
${
OPENCV_TBB_RELEASE_
}
"
)
set
(
OPENCV_TBB_SUBDIR
"oneTBB-
${
OPENCV_TBB_RELEASE_
}
"
)
else
()
message
(
FATAL_ERROR
"TBB: Can't configure TBB. Specify OPENCV_TBB_SUBDIR through command-line."
)
endif
()
set
(
tbb_src_dir
"
${
tbb_src_dir
}
/
${
OPENCV_TBB_SUBDIR
}
"
)
set
(
tbb_src_dir
"
${
tbb_src_dir
}
/
${
OPENCV_TBB_SUBDIR
}
"
)
ocv_include_directories
(
"
${
tbb_src_dir
}
/include"
ocv_include_directories
(
"
${
tbb_src_dir
}
/include"
...
@@ -36,11 +46,11 @@ file(GLOB lib_srcs "${tbb_src_dir}/src/tbb/*.cpp")
...
@@ -36,11 +46,11 @@ file(GLOB lib_srcs "${tbb_src_dir}/src/tbb/*.cpp")
file
(
GLOB lib_hdrs
"
${
tbb_src_dir
}
/src/tbb/*.h"
)
file
(
GLOB lib_hdrs
"
${
tbb_src_dir
}
/src/tbb/*.h"
)
list
(
APPEND lib_srcs
"
${
tbb_src_dir
}
/src/rml/client/rml_tbb.cpp"
)
list
(
APPEND lib_srcs
"
${
tbb_src_dir
}
/src/rml/client/rml_tbb.cpp"
)
ocv_list_filterout
(
lib_srcs
"
${
tbb_src_dir
}
/src/tbb/tbbbind.cpp"
)
# hwloc.h requirement
ocv_list_filterout
(
lib_srcs
"
${
tbb_src_dir
}
/src/tbb/tbbbind.cpp"
)
# hwloc.h requirement
ocv_list_filterout
(
lib_srcs
"
${
tbb_src_dir
}
/src/tbb/tbb_bind.cpp"
)
# hwloc.h requirement 2020.1+
if
(
WIN32
)
if
(
WIN32
)
add_definitions
(
/D__TBB_DYNAMIC_LOAD_ENABLED=0
add_definitions
(
/D__TBB_DYNAMIC_LOAD_ENABLED=0
/D__TBB_BUILD=1
/D__TBB_BUILD=1
/DTBB_SUPPRESS_DEPRECATED_MESSAGES=1
/DTBB_NO_LEGACY=1
/DTBB_NO_LEGACY=1
/D_UNICODE
/D_UNICODE
/DUNICODE
/DUNICODE
...
@@ -99,7 +109,11 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}.cmakein" "${CMAK
...
@@ -99,7 +109,11 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}.cmakein" "${CMAK
list
(
APPEND TBB_SOURCE_FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
tbb_version_file
}
"
)
list
(
APPEND TBB_SOURCE_FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
tbb_version_file
}
"
)
add_library
(
tbb
${
TBB_SOURCE_FILES
}
)
add_library
(
tbb
${
TBB_SOURCE_FILES
}
)
target_compile_definitions
(
tbb PUBLIC TBB_USE_GCC_BUILTINS=1 __TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
)
target_compile_definitions
(
tbb PUBLIC
TBB_USE_GCC_BUILTINS=1
__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
TBB_SUPPRESS_DEPRECATED_MESSAGES=1
)
target_include_directories
(
tbb SYSTEM PUBLIC $<BUILD_INTERFACE:
${
tbb_src_dir
}
/include>
target_include_directories
(
tbb SYSTEM PUBLIC $<BUILD_INTERFACE:
${
tbb_src_dir
}
/include>
PRIVATE
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
PRIVATE
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment