Skip to content

Commit

Permalink
Merge pull request #62 from c-dilks/opt-warning-supp
Browse files Browse the repository at this point in the history
build: add option for warning (non-)suppression
  • Loading branch information
gavalian authored Oct 14, 2024
2 parents 2009487 + 4262818 commit a98b98f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ foreach ex : example_sources
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
cpp_args: get_option('suppress_warnings') ? [ '-Wno-sign-compare' ] : [], # FIXME: fix the warnings; they are suppressed by these args
)
if(ex.get('test_this', true))
test(
Expand Down
2 changes: 1 addition & 1 deletion examples/root/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ foreach ex : example_root_sources
link_with: [ hipo_lib ],
link_args: [ '-L' + ROOT_libdir, '-lCore', '-lRIO', '-lHist', '-lTree', '-lPhysics' ],
install: ex['install_this'],
cpp_args: [ '-Wno-unused-variable', '-Wno-unused-but-set-variable', '-Wno-sign-compare' ], # FIXME: fix the warnings
cpp_args: get_option('suppress_warnings') ? [ '-Wno-unused-variable', '-Wno-unused-but-set-variable', '-Wno-sign-compare' ] : [], # FIXME: fix the warnings
)
endforeach
2 changes: 1 addition & 1 deletion extensions/dataframes/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dataframe_lib = library(
link_with: [ hipo_lib ],
link_args: [ '-L' + ROOT_libdir, '-lCore', '-lROOTDataFrame', '-lROOTVecOps' ],
build_rpath: ROOT_libdir,
cpp_args: [ '-Wno-sign-compare' ], # FIXME: fix these warnings
cpp_args: get_option('suppress_warnings') ? [ '-Wno-sign-compare' ] : [], # FIXME: fix these warnings
install: true
)
install_headers(dataframe_headers, subdir: meson.project_name())
Expand Down
4 changes: 2 additions & 2 deletions hipo4/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ hipo_lib = library(
meson.project_name(),
hipo_sources,
dependencies: [ lz4_dep ],
cpp_args: [ # FIXME: fix the warnings; they are suppressed by these args
cpp_args: get_option('suppress_warnings') ? [ # FIXME: fix the warnings; they are suppressed by these args
'-Wno-sign-compare',
'-Wno-unused-variable',
'-Wno-unused-but-set-variable',
'-Wno-misleading-indentation',
'-Wno-format',
'-Wno-stringop-overflow',
],
] : [],
install: true
)

Expand Down
3 changes: 3 additions & 0 deletions meson.options
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# compiling
option('suppress_warnings', type: 'boolean', value: true, description: 'if true, suppress compiler warnings; this option exists until warnings are fixed')

# 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')
Expand Down

0 comments on commit a98b98f

Please sign in to comment.