From 78ecc09275c1052204c92b6efdac9c06bdbc7d6f Mon Sep 17 00:00:00 2001 From: Esteban DUGUEPEROUX Date: Thu, 20 Jul 2023 12:42:28 +0200 Subject: [PATCH 1/2] Add onetbb/2021.5.0 needed by cctag/1.0.3 --- recipes/onetbb/all/conandata.yml | 8 ++++++++ recipes/onetbb/all/conanfile.py | 4 ++++ recipes/onetbb/config.yml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/recipes/onetbb/all/conandata.yml b/recipes/onetbb/all/conandata.yml index 880145b4a46b0..59d5900c783fd 100644 --- a/recipes/onetbb/all/conandata.yml +++ b/recipes/onetbb/all/conandata.yml @@ -11,6 +11,9 @@ sources: "2021.6.0": url: "https://github.com/oneapi-src/oneTBB/archive/v2021.6.0.tar.gz" sha256: "4897dd106d573e9dacda8509ca5af1a0e008755bf9c383ef6777ac490223031f" + "2021.5.0": + url: "https://github.com/oneapi-src/oneTBB/archive/v2021.5.0.tar.gz" + sha256: "e5b57537c741400cf6134b428fc1689a649d7d38d9bb9c1b6d64f092ea28178a" "2021.3.0": url: "https://github.com/oneapi-src/oneTBB/archive/v2021.3.0.tar.gz" sha256: "8f616561603695bbb83871875d2c6051ea28f8187dbe59299961369904d1d49e" @@ -30,6 +33,11 @@ patches: patch_type: "portability" patch_source: "https://github.com/oneapi-src/oneTBB/pull/716.diff" patch_file: "patches/fix-overeager-stripping-of-compile-flag.diff" + "2021.5.0": + - patch_description: "cherry-pick upstream patch: avoid android compile errors for current NDKs on releases <= 2021.6.0" + patch_type: "portability" + patch_source: "https://github.com/oneapi-src/oneTBB/pull/716.diff" + patch_file: "patches/fix-overeager-stripping-of-compile-flag.diff" "2021.3.0": - patch_description: "cherry-pick upstream patch: avoid android compile errors for current NDKs on releases <= 2021.6.0" patch_type: "portability" diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 165436b84b383..031f632bb6699 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -206,3 +206,7 @@ def lib_name(name): self.cpp_info.names["pkg_config"] = "tbb" tbb.names["cmake_find_package"] = "tbb" tbb.names["cmake_find_package_multi"] = "tbb" + + # To be able to build statically, see https://github.com/oneapi-src/oneTBB/issues/802#issuecomment-1062799037 + if not self.options.shared: + self.cpp_info.defines = ["__TBB_DYNAMIC_LOAD_ENABLED=0"] diff --git a/recipes/onetbb/config.yml b/recipes/onetbb/config.yml index 7995868f434ad..7976e2187f70d 100644 --- a/recipes/onetbb/config.yml +++ b/recipes/onetbb/config.yml @@ -7,6 +7,8 @@ versions: folder: all "2021.6.0": folder: all + "2021.5.0": + folder: all "2021.3.0": folder: all "2020.3": From 53f88740d70084ac0bf4c9e816679d283d67e9b9 Mon Sep 17 00:00:00 2001 From: Esteban DUGUEPEROUX Date: Thu, 10 Aug 2023 03:53:30 +0200 Subject: [PATCH 2/2] test --- recipes/onetbb/all/conanfile.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/recipes/onetbb/all/conanfile.py b/recipes/onetbb/all/conanfile.py index 031f632bb6699..2dc5a2d6c7a7d 100644 --- a/recipes/onetbb/all/conanfile.py +++ b/recipes/onetbb/all/conanfile.py @@ -135,6 +135,11 @@ def generate(self): toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_INCLUDE_PATH"] = os.path.join(hwloc_package_folder, "include") if self.settings.os == "Windows": toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_DLL_PATH"] = os.path.join(hwloc_package_folder, "bin", "hwloc.dll") + + # To be able to build statically, see https://github.com/oneapi-src/oneTBB/issues/802#issuecomment-1062799037 + if not self.options.shared: + toolchain.preprocessor_definitions["__TBB_DYNAMIC_LOAD_ENABLED"] = "0" + toolchain.generate() def build(self): @@ -206,7 +211,3 @@ def lib_name(name): self.cpp_info.names["pkg_config"] = "tbb" tbb.names["cmake_find_package"] = "tbb" tbb.names["cmake_find_package_multi"] = "tbb" - - # To be able to build statically, see https://github.com/oneapi-src/oneTBB/issues/802#issuecomment-1062799037 - if not self.options.shared: - self.cpp_info.defines = ["__TBB_DYNAMIC_LOAD_ENABLED=0"]