tbb_2021_11_0: address feedback from #405670 (#406814)

authored by

John Ericson and committed by
GitHub
adaa24fb e4a95abb

+10 -35
+10 -1
pkgs/development/libraries/tbb/default.nix
··· 52 52 }) 53 53 # Fix Threads::Threads target for static from https://github.com/oneapi-src/oneTBB/pull/1248 54 54 # This is a conflict-resolved cherry-pick of the above PR to due to formatting differences. 55 - ./patches/fix-cmake-threads-threads-target-for-static.patch 55 + (fetchpatch { 56 + name = "fix-cmake-threads-threads-target-for-static.patch"; 57 + url = "https://patch-diff.githubusercontent.com/raw/uxlfoundation/oneTBB/pull/1248.patch"; 58 + hash = "sha256-3WKzxU93vxuy7NgW+ap+ocZz5Q5utZ/pK7+FQExzLLA="; 59 + }) 60 + ]; 61 + 62 + patchFlags = [ 63 + "-p1" 64 + "--ignore-whitespace" 56 65 ]; 57 66 58 67 # Fix build with modern gcc
-34
pkgs/development/libraries/tbb/patches/fix-cmake-threads-threads-target-for-static.patch
··· 1 - From b42f074a724a41d2369a94283a2e94190d0cbb44 Mon Sep 17 00:00:00 2001 2 - From: Liam Keegan <liam@keegan.ch> 3 - Date: Fri, 10 Nov 2023 09:08:42 +0100 4 - Subject: [PATCH] Fix CMake "Threads::Threads target not found" issue for 5 - static builds (#1248) 6 - 7 - - add `Threads` dependency to installed CMake config for static builds only 8 - - based on #912 by @p12tic including reviewer comments from @ilya-lavrenov and @isaevil 9 - - resolves #1145 10 - 11 - Signed-off-by: Liam Keegan <liam@keegan.ch> 12 - (cherry picked from commit 12ceae12138af08845b3e8c369b24527346fe99e) 13 - --- 14 - CMakeLists.txt | 4 ++++ 15 - 1 file changed, 4 insertions(+) 16 - 17 - diff --git a/CMakeLists.txt b/CMakeLists.txt 18 - index 16ee29ed..0bc39a52 100644 19 - --- a/CMakeLists.txt 20 - +++ b/CMakeLists.txt 21 - @@ -265,6 +265,10 @@ else() 22 - COMPONENT devel) 23 - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake 24 - "include(\${CMAKE_CURRENT_LIST_DIR}/${PROJECT_NAME}Targets.cmake)\n") 25 - + if (NOT BUILD_SHARED_LIBS) 26 - + file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake 27 - + "include(CMakeFindDependencyMacro)\nfind_dependency(Threads)\n") 28 - + endif() 29 - 30 - write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" 31 - COMPATIBILITY AnyNewerVersion) 32 - -- 33 - 2.49.0 34 -