parallel-hashmap: add new package (#39299)

This commit is contained in:
Jen Herting 2023-08-08 04:03:01 -04:00 committed by GitHub
parent 43de7f4881
commit bad8495e16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 31 additions and 0 deletions

View File

@ -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")

View File

@ -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()