Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 1 | project('openpower-hw-diags', 'cpp', |
| 2 | version: '0.1', meson_version: '>=0.49.0', |
| 3 | default_options: [ |
| 4 | 'warning_level=3', |
| 5 | 'werror=true', |
Ben Tyner | 92e39fd | 2020-02-05 18:11:02 -0600 | [diff] [blame] | 6 | 'cpp_std=c++17', |
| 7 | 'cpp_args=-Wno-unused-parameter' |
Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 8 | ]) |
| 9 | |
Ben Tyner | 92e39fd | 2020-02-05 18:11:02 -0600 | [diff] [blame] | 10 | # libhei is available as a subproject |
| 11 | subproject('libhei') |
| 12 | |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 13 | incdir = include_directories('.') |
| 14 | |
| 15 | subdir('analyzer') |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 16 | subdir('attn') |
Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 17 | |
Ben Tyner | 8c2f8b2 | 2020-03-27 10:39:31 -0500 | [diff] [blame] | 18 | pthread = declare_dependency(link_args : '-pthread') |
| 19 | lrt = declare_dependency(link_args : '-lrt') |
| 20 | |
Ben Tyner | d3cda74 | 2020-05-04 08:00:28 -0500 | [diff] [blame] | 21 | no_listener_mode = get_option('nlmode') |
| 22 | |
| 23 | if not no_listener_mode.disabled() |
| 24 | executable('openpower-hw-diags', 'main_nl.cpp', 'cli.cpp', |
| 25 | link_with : [analyzer, attn], |
| 26 | install : true) |
| 27 | else |
| 28 | executable('openpower-hw-diags', 'main.cpp', 'cli.cpp', 'listener.cpp', |
| 29 | dependencies : [lrt, pthread], |
| 30 | link_with : [analyzer, attn], |
| 31 | install : true) |
| 32 | endif |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 33 | |
Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 34 | build_tests = get_option('tests') |
| 35 | |
| 36 | if not build_tests.disabled() |
| 37 | subdir('test') |
| 38 | endif |