From bad8495e1662c8218931a558ed7c106f06b9d1b3 Mon Sep 17 00:00:00 2001 From: Jen Herting Date: Tue, 8 Aug 2023 04:03:01 -0400 Subject: parallel-hashmap: add new package (#39299) --- .../builtin/packages/parallel-hashmap/package.py | 20 ++++++++++++++++++++ .../builtin/packages/parallel-hashmap/pthread.patch | 11 +++++++++++ 2 files changed, 31 insertions(+) create mode 100644 var/spack/repos/builtin/packages/parallel-hashmap/package.py create mode 100644 var/spack/repos/builtin/packages/parallel-hashmap/pthread.patch diff --git a/var/spack/repos/builtin/packages/parallel-hashmap/package.py b/var/spack/repos/builtin/packages/parallel-hashmap/package.py new file mode 100644 index 0000000000..349fafe52c --- /dev/null +++ b/var/spack/repos/builtin/packages/parallel-hashmap/package.py @@ -0,0 +1,20 @@ +# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack.package import * + + +class ParallelHashmap(CMakePackage): + """A family of header-only, very fast and memory-friendly hashmap and btree + containers.""" + + homepage = "https://github.com/greg7mdp/parallel-hashmap" + url = "https://github.com/greg7mdp/parallel-hashmap/archive/refs/tags/v1.3.11.tar.gz" + + version("1.3.11", sha256="0515a681bfb24207013786a7737e9d8561302e656689d8a65ea480bbabab460f") + + depends_on("cmake@3.8:", type="build") + + patch("pthread.patch") diff --git a/var/spack/repos/builtin/packages/parallel-hashmap/pthread.patch b/var/spack/repos/builtin/packages/parallel-hashmap/pthread.patch new file mode 100644 index 0000000000..68dce0b6f5 --- /dev/null +++ b/var/spack/repos/builtin/packages/parallel-hashmap/pthread.patch @@ -0,0 +1,11 @@ +diff -ur a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2023-08-01 13:46:16.726147070 -0400 ++++ b/CMakeLists.txt 2023-08-01 13:46:36.819307049 -0400 +@@ -197,6 +197,7 @@ + add_executable(ex_matt examples/matt.cc phmap.natvis) + add_executable(ex_mt_word_counter examples/mt_word_counter.cc phmap.natvis) + ++ target_link_libraries(ex_mt_word_counter Threads::Threads) + target_link_libraries(ex_knucleotide Threads::Threads) + target_link_libraries(ex_bench Threads::Threads) + endif() -- cgit v1.2.3-70-g09d2