Skip to content

Commit

Permalink
feat: option to disable building examples
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks committed Aug 22, 2024
1 parent 30a17b8 commit 3b6f613
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ project_libs = []
subdir('hipo4')

# build examples
subdir('examples')
if(ROOT_dep.found())
if(get_option('build_examples'))
subdir('examples')
endif
if(ROOT_dep.found() and get_option('install_root_tools'))
subdir('examples/root')
endif

Expand Down
12 changes: 9 additions & 3 deletions meson.options
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# examples
option('build_examples', type: 'boolean', value: true, description: 'build examples; see also "install_examples"')
option('install_examples', type: 'boolean', value: false, description: 'install examples; requires "build_examples" to be true')

# ROOT extensions and tools
option('dataframes', type: 'boolean', value: true, description: 'install HIPO dataframes extension')
option('install_examples', type: 'boolean', value: false, description: 'install examples')
option('install_root_tools', type: 'boolean', value: true, description: 'install ROOT tools such as "hipo_hist2root"')
option('test_file', type: 'string', value: '', description: 'sample HIPO file to use for certain tests; if unspecified, those tests will not run; must be an absolute path')
option('test_fortran', type: 'boolean', value: false, description: 'test Fortran example; you must have a Fortran compiler and build option "test_file" must be set')

# testing
option('test_file', type: 'string', value: '', description: 'sample HIPO file to use for certain tests; if unspecified, those tests will not run; must be an absolute path')
option('test_fortran', type: 'boolean', value: false, description: 'test Fortran example; you must have a Fortran compiler and build option "test_file" must be set')

0 comments on commit 3b6f613

Please sign in to comment.