From 3925695887a3c02c760757b27b6789c766a2b86c Mon Sep 17 00:00:00 2001 From: Ben Langmead Date: Wed, 27 Mar 2024 09:00:04 -0400 Subject: [PATCH 1/2] update with pthreads dependencies --- meson.build | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index b73b0c8..4882c88 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,8 @@ nthash = subproject('ntHash') nthash_dep = nthash.get_variable('lib_dep') include_dirs = [include_directories('include'), nthash.get_variable('include_dirs')] +ptl = meson.get_compiler('cpp').find_library('pthread') + digest_lib = static_library( 'digest', include_directories: include_dirs, @@ -55,7 +57,7 @@ if get_option('buildtype') != 'release' executable( 'bench', 'tests/bench/benchmark.cpp', - dependencies : [bench, digest_dep], + dependencies : [bench, digest_dep, ptl], ) ### benchmark data structures ### @@ -83,7 +85,7 @@ if get_option('buildtype') != 'release' executable( 'test_thread', 'tests/test/test_thread.cpp', - dependencies : [catch2, digest_dep], + dependencies : [catch2, digest_dep, ptl], ) doxygen = find_program('doxygen', required: false) From d9711e491afafb53a01f966293c6200e0d14e09f Mon Sep 17 00:00:00 2001 From: ishmeals Date: Wed, 27 Mar 2024 11:11:31 -0400 Subject: [PATCH 2/2] Use recommended method --- meson.build | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 4882c88..b1bad52 100644 --- a/meson.build +++ b/meson.build @@ -15,7 +15,7 @@ nthash = subproject('ntHash') nthash_dep = nthash.get_variable('lib_dep') include_dirs = [include_directories('include'), nthash.get_variable('include_dirs')] -ptl = meson.get_compiler('cpp').find_library('pthread') +thread_dep = dependency('threads') digest_lib = static_library( 'digest', @@ -57,7 +57,7 @@ if get_option('buildtype') != 'release' executable( 'bench', 'tests/bench/benchmark.cpp', - dependencies : [bench, digest_dep, ptl], + dependencies : [bench, digest_dep, thread_dep], ) ### benchmark data structures ### @@ -85,7 +85,7 @@ if get_option('buildtype') != 'release' executable( 'test_thread', 'tests/test/test_thread.cpp', - dependencies : [catch2, digest_dep, ptl], + dependencies : [catch2, digest_dep, thread_dep], ) doxygen = find_program('doxygen', required: false)