From fc6af4f4afa16ca8d86b2f99779be12151c43bc4 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Thu, 23 May 2024 16:40:05 +0400 Subject: [PATCH] Use system TBB by default for Deb, RPM (#24613) ### Details: - Otherwise, currently users have error during Debian package build --- cmake/features.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/features.cmake b/cmake/features.cmake index b785cddabe1..bfa3a05481d 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -162,7 +162,15 @@ else() set(ENABLE_SYSTEM_FLATBUFFERS_DEFAULT ON) endif() -ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" OFF "THREADING MATCHES TBB" OFF) +# use system TBB only for Debian / RPM packages +if(CPACK_GENERATOR MATCHES "^(DEB|RPM|CONDA-FORGE|BREW|CONAN|VCPKG)$") + set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT}) +else() + set(ENABLE_SYSTEM_TBB_DEFAULT OFF) +endif() + +ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} + "THREADING MATCHES TBB" OFF) ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" OFF) # the option is on by default, because we use only flatc compiler and don't use any libraries ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}