Skip to content

Commit

Permalink
fix: add dependency threads for multi-threading example
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Aug 22, 2024
1 parent a380a08 commit 102944b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ example_sources = [
### 'test_args': list of arguments for this example, used for testing
### 'first': boolean, whether this test should be run before any others (default = false)
### 'build_this': whether or not to build this (default = true)
### 'deps': additional dependencies (default = [])
### },
{ 'sources': [ 'bankRowList.cc' ], 'test_this': test_external, 'test_args': [ external_test_file ] },
{ 'sources': [ 'builder.cc' ], 'test_this': false, 'test_args': [] },
{ 'sources': [ 'dataframe.cc' ], 'test_this': false, 'test_args': [] },
{ 'sources': [ 'histograms.cc' ], 'test_this': test_external, 'test_args': [ external_test_file ] },
{ 'sources': [ 'multithread.cc' ], 'test_this': false, 'test_args': [] },
{ 'sources': [ 'multithread.cc' ], 'test_this': false, 'test_args': [], 'deps': [ thread_dep ], 'build_this': thread_dep.found() },
{ 'sources': [ 'readEvents.cc' ], 'test_this': false, 'test_args': [] },
{ 'sources': [ 'readFile.cc' ], 'test_this': true, 'test_args': [ 'example_output.hipo' ] },
{ 'sources': [ 'readFileDebug.cc' ], 'test_this': false, 'test_args': [] },
Expand Down Expand Up @@ -43,6 +44,7 @@ foreach ex : example_sources
sources: ex['sources'],
include_directories: [ hipo_inc ],
link_with: project_libs,
dependencies: ex.get('deps', []),
install: get_option('install_examples'),
cpp_args: [ '-Wno-sign-compare' ], # FIXME: fix the warnings; they are suppressed by these args
)
Expand Down
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ ROOT_dep = dependency(
required: false,
not_found_message: 'ROOT not found; tools which depend on ROOT will not be built.',
)
thread_dep = dependency(
'threads',
required: false,
)

# handle ROOT
# NOTE: hipo library does NOT depend on ROOT, but some extensions and examples do
Expand Down

0 comments on commit 102944b

Please sign in to comment.