fix OPENCV_DISABLE_THREAD_SUPPORT

Message was,
  CMake Error at CMakeLists.txt:1475 (message):
    Not all parallel frameworks have been disabled (using Concurrency).
This commit is contained in:
Stanislaw Halik 2021-10-04 14:42:08 +02:00
parent 4dd3ab8f32
commit d023f316ac

View File

@ -17,7 +17,7 @@ else()
endif()
# --- Concurrency ---
if(MSVC AND NOT HAVE_TBB)
if(MSVC AND NOT HAVE_TBB AND NOT OPENCV_DISABLE_THREAD_SUPPORT)
set(_fname "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/concurrencytest.cpp")
file(WRITE "${_fname}" "#if _MSC_VER < 1600\n#error\n#endif\nint main() { return 0; }\n")
try_compile(HAVE_CONCURRENCY "${CMAKE_BINARY_DIR}" "${_fname}")