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 | b859d79 | 2020-05-06 21:29:47 -0500 | [diff] [blame] | 10 | libhei_dep = dependency('hei', required : true) |
Ben Tyner | 92e39fd | 2020-02-05 18:11:02 -0600 | [diff] [blame] | 11 | |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 12 | incdir = include_directories('.') |
| 13 | |
| 14 | subdir('analyzer') |
Ben Tyner | ef32015 | 2020-01-09 10:31:23 -0600 | [diff] [blame] | 15 | subdir('attn') |
Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 16 | |
Ben Tyner | 8c2f8b2 | 2020-03-27 10:39:31 -0500 | [diff] [blame] | 17 | pthread = declare_dependency(link_args : '-pthread') |
| 18 | lrt = declare_dependency(link_args : '-lrt') |
| 19 | |
Ben Tyner | d3cda74 | 2020-05-04 08:00:28 -0500 | [diff] [blame] | 20 | no_listener_mode = get_option('nlmode') |
| 21 | |
| 22 | if not no_listener_mode.disabled() |
| 23 | executable('openpower-hw-diags', 'main_nl.cpp', 'cli.cpp', |
| 24 | link_with : [analyzer, attn], |
| 25 | install : true) |
| 26 | else |
| 27 | executable('openpower-hw-diags', 'main.cpp', 'cli.cpp', 'listener.cpp', |
| 28 | dependencies : [lrt, pthread], |
| 29 | link_with : [analyzer, attn], |
| 30 | install : true) |
| 31 | endif |
Ben Tyner | 0205f3b | 2020-02-24 10:24:47 -0600 | [diff] [blame] | 32 | |
Zane Shelley | 248cbf8 | 2019-05-03 17:07:18 -0500 | [diff] [blame] | 33 | build_tests = get_option('tests') |
| 34 | |
| 35 | if not build_tests.disabled() |
| 36 | subdir('test') |
| 37 | endif |