mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 12:40:05 +08:00
cmake: generate tbb version file
This commit is contained in:
parent
9665dde678
commit
8d4777c81d
17
3rdparty/tbb/CMakeLists.txt
vendored
17
3rdparty/tbb/CMakeLists.txt
vendored
@ -9,10 +9,11 @@ set(tbb_filename "2018_U1.tar.gz")
|
||||
set(tbb_subdir "tbb-2018_U1")
|
||||
set(tbb_md5 "b2f2fa09adf44a22f4024049907f774b")
|
||||
|
||||
set(tbb_version_file "version_string.ver")
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4702)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wshadow)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wunused-parameter)
|
||||
ocv_warnings_disable(CMAKE_CXX_FLAGS /wd4702
|
||||
-Wshadow
|
||||
-Wunused-parameter
|
||||
-Wmissing-prototypes # MacOSX
|
||||
)
|
||||
|
||||
set(tbb_src_dir "${OpenCV_BINARY_DIR}/3rdparty/tbb")
|
||||
ocv_download(FILENAME ${tbb_filename}
|
||||
@ -94,11 +95,15 @@ if (ARM AND NOT WIN32)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include \"${CMAKE_CURRENT_SOURCE_DIR}/android_additional.h\"")
|
||||
endif()
|
||||
|
||||
set(TBB_SOURCE_FILES ${TBB_SOURCE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}")
|
||||
set(tbb_version_file "version_string.ver")
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}.cmakein" "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}" @ONLY)
|
||||
list(APPEND TBB_SOURCE_FILES "${CMAKE_CURRENT_BINARY_DIR}/${tbb_version_file}")
|
||||
|
||||
add_library(tbb ${TBB_SOURCE_FILES})
|
||||
target_compile_definitions(tbb PUBLIC TBB_USE_GCC_BUILTINS=1 __TBB_GCC_BUILTIN_ATOMICS_PRESENT=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}"
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
if (ARM)
|
||||
|
9
3rdparty/tbb/version_string.tmp
vendored
9
3rdparty/tbb/version_string.tmp
vendored
@ -1,9 +0,0 @@
|
||||
#define __TBB_VERSION_STRINGS \
|
||||
"TBB: BUILD_HOST Unknown" ENDL \
|
||||
"TBB: BUILD_OS Android" ENDL \
|
||||
"TBB: BUILD_KERNEL Unknown" ENDL \
|
||||
"TBB: BUILD_GCC gcc version 4.4.3" ENDL \
|
||||
"TBB: BUILD_GLIBC Unknown" ENDL \
|
||||
"TBB: BUILD_LD Unknown" ENDL \
|
||||
"TBB: BUILD_TARGET Unknown" ENDL \
|
||||
"TBB: BUILD_COMMAND use cv::getBuildInformation() for details" ENDL
|
9
3rdparty/tbb/version_string.ver
vendored
9
3rdparty/tbb/version_string.ver
vendored
@ -1,9 +0,0 @@
|
||||
#define __TBB_VERSION_STRINGS(N) \
|
||||
#N": BUILD_HOST Unknown" ENDL \
|
||||
#N": BUILD_OS Android" ENDL \
|
||||
#N": BUILD_KERNEL Unknown" ENDL \
|
||||
#N": BUILD_GCC gcc version 4.4.3" ENDL \
|
||||
#N": BUILD_GLIBC Unknown" ENDL \
|
||||
#N": BUILD_LD Unknown" ENDL \
|
||||
#N": BUILD_TARGET Unknown" ENDL \
|
||||
#N": BUILD_COMMAND use cv::getBuildInformation() for details" ENDL
|
6
3rdparty/tbb/version_string.ver.cmakein
vendored
Normal file
6
3rdparty/tbb/version_string.ver.cmakein
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#define __TBB_VERSION_STRINGS(N) \
|
||||
#N": BUILD_PACKAGE OpenCV @OPENCV_VERSION@" ENDL \
|
||||
#N": BUILD_HOST @CMAKE_HOST_SYSTEM_NAME@ @CMAKE_HOST_SYSTEM_VERSION@ @CMAKE_HOST_SYSTEM_PROCESSOR@" ENDL \
|
||||
#N": BUILD_TARGET @CMAKE_SYSTEM_NAME@ @CMAKE_SYSTEM_VERSION@ @CMAKE_SYSTEM_PROCESSOR@" ENDL \
|
||||
#N": BUILD_COMPILER @CMAKE_CXX_COMPILER@ (ver @CMAKE_CXX_COMPILER_VERSION@)" ENDL \
|
||||
#N": BUILD_COMMAND use cv::getBuildInformation() for details" ENDL
|
Loading…
Reference in New Issue
Block a user