]> OCCT Git - occt.git/commitdiff
moving to intel oneTBB 2021*
authorddzama <ddzama@opencascade.com>
Thu, 25 Aug 2022 11:04:35 +0000 (14:04 +0300)
committerddzama <ddzama@opencascade.com>
Mon, 29 Aug 2022 10:45:15 +0000 (13:45 +0300)
CMakeLists.txt
adm/cmake/occt_csf.cmake
adm/cmake/tbb.cmake
adm/genconfdeps.tcl
adm/genproj.tcl
adm/qmake/OccToolkit.pri
adm/templates/custom.build.bat.in
adm/templates/custom.build.sh.in
dox/build/build_3rdparty/building_3rdparty.md
dox/introduction/introduction.md
samples/qt/IESample/IESample.pro

index 6106dff8021d25fdbd05e01a9d9f7c07033935da..c91763b5850e82032b5868cdce399c6423817b25 100644 (file)
@@ -717,14 +717,14 @@ if (NOT DEFINED ANDROID AND CAN_USE_TBB)
     add_definitions (-DHAVE_TBB)
     OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
   else()
-    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
+    OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB12")
     OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
     OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
   endif()
 else()
   OCCT_CHECK_AND_UNSET ("USE_TBB")
 
-  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
+  OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB12")
   OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
   OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
 endif()
index bee8ba78d9ebcaec81a7760cb34ec6d6b5e38e5a..692f6232d40df7058e9f6e0c8559e5d184a78337 100644 (file)
@@ -12,7 +12,7 @@ endif()
 
 # TBB
 if (USE_TBB)
-  set (CSF_TBB "tbb tbbmalloc")
+  set (CSF_TBB "tbb12 tbbmalloc")
 else()
   set (CSF_TBB)
 endif()
index 670fa4d338ca944e31d163d29764e4f02b9b0da2..bcfd63ef8f8f3a0d9af1195ac2b496f5819e8cc8 100644 (file)
@@ -69,12 +69,12 @@ else()
   set (3RDPARTY_TBB_INCLUDE_DIR "" CACHE PATH "the path to tbb.h" FORCE)
 endif()
 
-# common steps for tbb and tbbmalloc
+# common steps for tbb12 and tbbmalloc
 macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
 
   string (TOUPPER ${PRODUCT_LIBRARY_NAME} upper_PRODUCT_LIBRARY_NAME)
 
-  # define required tbb/tbbmalloc variables
+  # define required tbb12/tbbmalloc variables
   if (NOT DEFINED 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY_DIR}")
     set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
   endif()
@@ -126,7 +126,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
     set (${upper_PRODUCT_LIBRARY_NAME}_ARCH_NAME intel64)
   endif()
 
-  # tbb/tbbmalloc library
+  # tbb12/tbbmalloc library
   if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY}")
     
     set (CMAKE_FIND_LIBRARY_SUFFIXES .lib .so .dylib .a)
@@ -178,7 +178,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
     set (3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_LIBRARY "" CACHE FILEPATH "The path to ${upper_PRODUCT_LIBRARY_NAME} library" FORCE)
   endif()
 
-  # tbb/tbbmalloc shared library
+  # tbb12/tbbmalloc shared library
   if (WIN32)
     if (NOT 3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL OR NOT EXISTS "${3RDPARTY_${upper_PRODUCT_LIBRARY_NAME}_DLL}")
       set (CMAKE_FIND_LIBRARY_SUFFIXES .dll)
@@ -230,7 +230,7 @@ macro (TBB_PRODUCT_SEARCH PRODUCT_LIBRARY_NAME)
     endif()
   endif()
 
-  # install tbb/tbbmalloc
+  # install tbb12/tbbmalloc
   if (INSTALL_TBB)
     OCCT_MAKE_OS_WITH_BITNESS()
     OCCT_MAKE_COMPILER_SHORT_NAME()
@@ -286,9 +286,9 @@ endmacro()
   else()
     # the library directory for using by the executable
     if (WIN32)
-      set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_DLL_DIR})
+      set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB12_DLL_DIR})
     else()
-      set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB_LIBRARY_DIR})
+      set (USED_3RDPARTY_TBB_DIR ${3RDPARTY_TBB12_LIBRARY_DIR})
     endif()
   endif()
 #endif()
index 1ffb65afdb94890a249ab27ab62861ae6003df8d..19096fd3d90b5cee92a5c1d389155f4ece2d7506 100644 (file)
@@ -775,19 +775,19 @@ proc wokdep:SearchTBB {theErrInc theErrLib32 theErrLib64 theErrBin32 theErrBin64
         lappend ::CSF_OPT_LIB$anArchIter "$aPath/lib/$aSubDir/$aVcLib"
       }
       if { "$aTbbLibPath" == "" } {
-        lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}tbb.${::SYS_LIB_SUFFIX}' not found (Intel TBB)"
+        lappend anErrLib$anArchIter "Error: '${::SYS_LIB_PREFIX}tbb12.${::SYS_LIB_SUFFIX}' not found (Intel TBB)"
         if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
       }
     }
     if { "$::tcl_platform(platform)" == "windows" } {
-      set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter"]
+      set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter"]
       if { "$aTbbDllPath" == "" } {
         set aPath [wokdep:Preferred [glob -nocomplain -directory "$::PRODUCTS_PATH" -type d *{tbb}*] $aVcLib "$anArchIter" ]
-        set aTbbDllPath [wokdep:SearchBin "tbb.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"]
+        set aTbbDllPath [wokdep:SearchBin "tbb12.dll" "$anArchIter" "$aPath/bin/$aSubDir/$aVcLib"]
         if { "$aTbbDllPath" != "" } {
           lappend ::CSF_OPT_BIN$anArchIter "$aPath/bin/$aSubDir/$aVcLib"
         } else {
-          lappend anErrBin$anArchIter "Error: 'tbb.dll' not found (Intel TBB)"
+          lappend anErrBin$anArchIter "Error: 'tbb12.dll' not found (Intel TBB)"
           if { "$::ARCH" == "$anArchIter"} { set isFound "false" }
         }
       }
index 90ab8d16aedcff5dfe6f90b2defa3ed5a4c0442b..1599047cf82aed187077b1b076585b667b196055 100644 (file)
@@ -1437,7 +1437,7 @@ proc osutils:csfList { theOS theCsfLibsMap theCsfFrmsMap theRelease} {
     set aLibsMap(CSF_FFmpeg) "avcodec avformat swscale avutil"
   }
   if { "$::HAVE_TBB" == "true" } {
-    set aLibsMap(CSF_TBB) "tbb tbbmalloc"
+    set aLibsMap(CSF_TBB) "tbb12 tbbmalloc"
   }
   if { "$::HAVE_VTK" == "true" } {
     if { "$theOS" == "wnt" } {
index 3f18edb1cf203f0ea65a000a63df59256097c677..51849ab9b71235432313dd81bd20d0b6b79f8db6 100644 (file)
@@ -23,7 +23,7 @@ CSF_TclLibs   = -ltcl8.6
 CSF_TclTkLibs = -ltk8.6
 HAVE_FREEIMAGE { CSF_FreeImagePlus = -lfreeimage } else:win32 { CSF_FreeImagePlus = -lwindowscodecs -lole32 }
 HAVE_FFMPEG    { CSF_FFmpeg = -lavcodec -lavformat -lswscale -lavutil }
-HAVE_TBB       { CSF_TBB = -ltbb -ltbbmalloc }
+HAVE_TBB       { CSF_TBB = -ltbb12 -ltbbmalloc }
 HAVE_ZLIB      { CSF_ZLIB = -lzlib }
 HAVE_LIBLZMA   { CSF_LIBLZMA = -lliblzma }
 HAVE_DRACO     { CSF_Draco = -ldraco }
index 39ad45085be94285588d43eb80ff76d1894b485b..0898edd15a911e409b24d3904e5e22194d0cf21a 100644 (file)
@@ -11,7 +11,7 @@ if /I "%VCVER%" == "@COMPILER@" (
     set "FREEIMAGE_DIR=@3RDPARTY_FREEIMAGE_DLL_DIRS@"
     set "EGL_DIR=@3RDPARTY_EGL_DLL_DIRS@"
     set "GLES2_DIR=@3RDPARTY_GLES2_DLL_DIRS@"
-    set "TBB_DIR=@3RDPARTY_TBB_DLL_DIR@"
+    set "TBB_DIR=@3RDPARTY_TBB12_DLL_DIR@"
     set "VTK_DIR=@3RDPARTY_VTK_DLL_DIR@"
     set "FFMPEG_DIR=@3RDPARTY_FFMPEG_DLL_DIR@"
     set "OPENVR_DIR=@3RDPARTY_OPENVR_DLL_DIRS@"
index 1f3d2018bea0e67243a2705f7d55f54f6e2a543a..c66ffa0c6208b2f5d7fd279e18e9195979b58045 100644 (file)
@@ -9,7 +9,7 @@ if [ "$1" == "@BIN_LETTER@" ]; then
     export TK_DIR="@3RDPARTY_TK_LIBRARY_DIR@"
     export FREETYPE_DIR="@3RDPARTY_FREETYPE_LIBRARY_DIR@"
     export FREEIMAGE_DIR="@3RDPARTY_FREEIMAGE_LIBRARY_DIRS@"
-    export TBB_DIR="@3RDPARTY_TBB_LIBRARY_DIR@"
+    export TBB_DIR="@3RDPARTY_TBB12_LIBRARY_DIR@"
     export VTK_DIR="@3RDPARTY_VTK_LIBRARY_DIR@"
     export FFMPEG_DIR="@3RDPARTY_FFMPEG_LIBRARY_DIR@"
 
index 2eee48c8eba7a792d62b6b027777e333d89c243d..bc7d892671f2decffb2bdcfc05444a811afc111d 100644 (file)
@@ -128,8 +128,9 @@ You can download its sources from https://freetype.org/
 
 @subsection dev_guides__building_3rdparty_win_3_1 TBB
 
-This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
-Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Windows platform.
+This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
+Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Windows platform.
+To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-win.zip`)
 
 Unpack the downloaded archive of TBB product into the `3rdparty` folder.
 
@@ -304,9 +305,9 @@ Download the necessary archive from https://freetype.org/ and unpack it.
 
 @subsection dev_guides__building_3rdparty_linux_3_1 TBB
 
-This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
-Go to the **Download** page, find the release version you need and pick the archive for Linux platform.
-To install, unpack the downloaded archive of TBB product.
+This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
+Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Linux platform.
+To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-lin.tgz`).
 
 @subsection dev_guides__building_3rdparty_linux_3_3 FreeImage
 
@@ -477,9 +478,9 @@ Download the necessary archive from https://freetype.org/ and unpack it.
 
 @subsection dev_guides__building_3rdparty_osx_3_1 TBB
 
-This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/intel/tbb.
-Go to the **Download** page, find the release version you need (e.g. `tbb30_018oss`) and pick the archive for Mac OS X platform.
-To install, unpack the downloaded archive of TBB product (`tbb30_018oss_osx.tgz`).
+This third-party product is installed with binaries from the archive that can be downloaded from https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0.
+Go to the **Download** page, find the release version you need (e.g. `oneTBB 2021.5.0`) and pick the archive for Mac OS X platform.
+To install, unpack the downloaded archive of TBB product (`oneapi-tbb-2021.5.0-mac.tgz`).
 
 @subsection dev_guides__building_3rdparty_osx_3_3 FreeImage
 
index edfc7e9412e3c5487fc3e8d58476c927cdd4fbbb..115bf571fab46d9a26784016cc0ed68b0448cebf 100644 (file)
@@ -360,7 +360,7 @@ https://dev.opencascade.org/resources/download/3rd-party-components
 | Component | Where to find | Used for | Purpose |
 | --------- | ------------- | -------- | -------------------- |
 | CMake 3.1+ | https://cmake.org/ | Configuration | Build from sources |
-| Intel TBB 4.x or later | https://oneapi-src.github.io/oneTBB/ | All | Parallelization of algorithms (alternative to built-in thread pool) |
+| Intel oneTBB 2021.5.0 | https://github.com/oneapi-src/oneTBB/releases/tag/v2021.5.0 | All | Parallelization of algorithms (alternative to built-in thread pool) |
 | OpenGL 3.3+, OpenGL ES 2.0+ | System | Visualization | Required for using 3D Viewer |
 | OpenVR 1.10+ | https://github.com/ValveSoftware/openvr | Visualization | VR (Virtual Reality) support in 3D Viewer |
 | FreeType 2.4+ | https://www.freetype.org/download.html | Visualization | Text rendering in 3D Viewer |
@@ -572,7 +572,7 @@ FreeType 2 is released under two open-source licenses: BSD-like FreeType License
 It is a library that helps you to take advantage of multi-core processor performance without having to be a threading expert. 
 Threading Building Blocks is not just a threads-replacement library. It represents a higher-level, task-based parallelism that 
 abstracts platform details and threading mechanisms for scalability and performance. 
-TBB version 2017 is available under Apache 2.0 license, while older versions 
+oneTBB 2021.5.0 is available under Apache 2.0 license, while older versions
 until 4.4 are available under GPLv2 license with the runtime exception (https://www.threadingbuildingblocks.org).
 
 **OpenGL** is an industry standard API for 3D graphics used by OCCT for 
index 12f51c70695166b8ed16b064f2165ccdb85c9656..24a56a5cde1a3794a4c46da59495f024a8357139 100755 (executable)
@@ -51,7 +51,7 @@ unix {
     DEFINES += OCC_CONVERT_SIGNALS QT_NO_STL
     !macx | equals(MACOSX_USE_GLX, true): LIBS += -L$$QMAKE_LIBDIR_X11 $$QMAKE_LIBS_X11 -L$$QMAKE_LIBDIR_OPENGL $$QMAKE_LIBS_OPENGL $$QMAKE_LIBS_THREAD
     LIBS += -lfreeimageplus
-    LIBS += -ltbb -ltbbmalloc
+    LIBS += -ltbb12 -ltbbmalloc
     QMAKE_CXXFLAGS += -std=gnu++11
 }