mirror of
https://github.com/opencv/opencv.git
synced 2024-12-13 07:59:27 +08:00
b928ebdd53
* [build][option] Introduce `OPENCV_DISABLE_THREAD_SUPPORT` option. The option forces the library to build without thread support. * update handling of OPENCV_DISABLE_THREAD_SUPPORT - reduce amount of #if conditions * [to squash] cmake: apply mode vars in toolchains too Co-authored-by: Alexander Alekhin <alexander.a.alekhin@gmail.com>
19 lines
569 B
CMake
19 lines
569 B
CMake
set(__OCV_MODE_VARS_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
|
|
|
macro(ocv_change_mode_var)
|
|
set(__var "${ARGV0}")
|
|
set(__mode "${ARGV1}")
|
|
set(__value "${ARGV2}")
|
|
if(__mode STREQUAL "MODIFIED_ACCESS" AND __value)
|
|
if(NOT __applied_mode_${__var})
|
|
include("${__OCV_MODE_VARS_DIR}/${__var}.cmake")
|
|
set(__applied_mode_${__var} 1)
|
|
else()
|
|
#message("Mode is already applied: ${__var}")
|
|
endif()
|
|
endif()
|
|
endmacro()
|
|
|
|
variable_watch(OPENCV_DISABLE_THREAD_SUPPORT ocv_change_mode_var)
|
|
set(OPENCV_DISABLE_THREAD_SUPPORT "${OPENCV_DISABLE_THREAD_SUPPORT}")
|