Skip to content

Commit

Permalink
fix: dataframe example should not build if libHipoDataFrame is not …
Browse files Browse the repository at this point in the history
…installed (#171)
  • Loading branch information
c-dilks authored Apr 17, 2024
1 parent e4887fe commit 06895ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ defaults:

env:
hipo_fork: c-dilks/hipo
hipo_ref: 4c8325bcf289c5da84f20e6e2b84f9b9ad121447 # for libHipoDataFrame in pkg-config
hipo_ref: 3f615258df28295d8dc3c5f02369dbf89dadb9e5 # for libHipoDataFrame in pkg-config
# test options
num_events: 1000
verbose_test: 'false' # only set this to 'true' if `meson test` fails and you need more output to investigate
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# in-source build artifacts
/*.ini
/build*/
/iguana
/iguana*/
/.cache

# doxygen artifacts
Expand Down
5 changes: 2 additions & 3 deletions examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ example_sources = {
},
'iguana-example-02-dataframes': {
'sources': [ 'iguana-example-02-dataframes.cc' ],
'needs_ROOT': true,
'build_this': ROOT_dep.found() and hipo_dep_dataframes_found,
},
'iguana-example-03-config-files': {
'sources': [ 'iguana-example-03-config-files.cc' ],
Expand All @@ -22,8 +22,7 @@ example_sources = {

# build executables and test them
foreach example, info : example_sources
example_needs_ROOT = info.get('needs_ROOT', false)
if (example_needs_ROOT and ROOT_dep.found()) or not example_needs_ROOT
if(info.get('build_this', true))
example_exe = executable(
example,
sources: info['sources'],
Expand Down
3 changes: 3 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ endforeach
message('Dependency library dirs = [', ', '.join(dep_lib_paths), ']')
message('Dependency include dirs = [', ', '.join(dep_inc_paths), ']')

# handle HIPO dataframes
hipo_dep_dataframes_found = hipo_dep.get_variable(pkgconfig: 'with_dataframes', default_value: 'false').to_lower() == 'true'

# handle ROOT
ROOT_dep_inc_dirs = []
ROOT_dep_link_args = []
Expand Down

0 comments on commit 06895ba

Please sign in to comment.