mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
cmake(tbb): fix target_compile_definitions() with "UNKNOWN" target
- https://gitlab.kitware.com/cmake/cmake/-/issues/19434
This commit is contained in:
parent
eced4dd023
commit
fcff767a7f
@ -85,7 +85,11 @@ function(ocv_tbb_env_guess _found)
|
||||
if(NOT (TBB_INTERFACE_VERSION LESS 12000)) # >= 12000, oneTBB 2021+
|
||||
# avoid "defaultlib" requirement of tbb12.lib (we are using absolute path to 'tbb.lib' only)
|
||||
# https://github.com/oneapi-src/oneTBB/blame/2dba2072869a189b9fdab3ffa431d3ea49059a19/include/oneapi/tbb/detail/_config.h#L334
|
||||
target_compile_definitions(tbb INTERFACE "__TBB_NO_IMPLICIT_LINKAGE=1")
|
||||
if(NOT (CMAKE_VERSION VERSION_LESS "3.16.0")) # https://gitlab.kitware.com/cmake/cmake/-/issues/19434
|
||||
target_compile_definitions(tbb INTERFACE "__TBB_NO_IMPLICIT_LINKAGE=1")
|
||||
else()
|
||||
set_target_properties(tbb PROPERTIES INTERFACE_COMPILE_OPTIONS "__TBB_NO_IMPLICIT_LINKAGE=1")
|
||||
endif()
|
||||
endif()
|
||||
message(STATUS "Found TBB (env): ${TBB_ENV_LIB}")
|
||||
set(${_found} TRUE PARENT_SCOPE)
|
||||
|
Loading…
Reference in New Issue
Block a user