Disable OMP threading on macOS (#20405)

This commit is contained in:
Ilya Lavrenov authored and GitHub committed 2023-10-12 11:34:01 +04:00
1 parent 79703ff714
commit 2a3d5b9d14
1 file changed
+8 -6
+8 -6
View File
@@ -80,14 +80,16 @@ else()
set(THREADING_DEFAULT "TBB")
endif()
set(THREADING_OPTIONS "TBB" "TBB_AUTO" "SEQ")
if(NOT APPLE)
list(APPEND THREADING_OPTIONS "OMP")
endif()
set(THREADING "${THREADING_DEFAULT}" CACHE STRING "Threading")
set_property(CACHE THREADING PROPERTY STRINGS "TBB" "TBB_AUTO" "OMP" "SEQ")
set_property(CACHE THREADING PROPERTY STRINGS ${THREADING_OPTIONS})
list (APPEND OV_OPTIONS THREADING)
if (NOT THREADING STREQUAL "TBB" AND
NOT THREADING STREQUAL "TBB_AUTO" AND
NOT THREADING STREQUAL "OMP" AND
NOT THREADING STREQUAL "SEQ")
message(FATAL_ERROR "THREADING should be set to TBB (default), TBB_AUTO, OMP or SEQ")
if(NOT THREADING IN_LIST THREADING_OPTIONS)
message(FATAL_ERROR "THREADING should be set to either ${THREADING_OPTIONS}")
endif()
if((THREADING STREQUAL "TBB" OR THREADING STREQUAL "TBB_AUTO") AND