mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
Merge pull request #19985 from fpetrogalli:disable_threads
* [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>
This commit is contained in:
committed by
GitHub
parent
59ae0e0013
commit
b928ebdd53
@@ -41,3 +41,9 @@ endif()
|
||||
if(NOT OPENCV_TESTS_CONFIG_STR STREQUAL "${__content}")
|
||||
file(WRITE "${OPENCV_TESTS_CONFIG_FILE}" "${OPENCV_TESTS_CONFIG_STR}")
|
||||
endif()
|
||||
|
||||
if(OPENCV_DISABLE_THREAD_SUPPORT)
|
||||
# This is required to disable threads in the ts module, as
|
||||
# described in `ts_gtest.h`.
|
||||
ocv_target_compile_definitions(${the_module} PUBLIC GTEST_HAS_PTHREAD=0)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user