blob: 32f2201c2397cf2c74a72b8da44c0264b8ee6148 [file] [log] [blame]
Zane Shelley248cbf82019-05-03 17:07:18 -05001project('openpower-hw-diags', 'cpp',
2 version: '0.1', meson_version: '>=0.49.0',
3 default_options: [
4 'warning_level=3',
5 'werror=true',
Ben Tyner92e39fd2020-02-05 18:11:02 -06006 'cpp_std=c++17',
7 'cpp_args=-Wno-unused-parameter'
Zane Shelley248cbf82019-05-03 17:07:18 -05008 ])
9
Ben Tyner92e39fd2020-02-05 18:11:02 -060010# libhei is available as a subproject
11subproject('libhei')
12
Ben Tyner0205f3b2020-02-24 10:24:47 -060013incdir = include_directories('.')
14
15subdir('analyzer')
Ben Tyneref320152020-01-09 10:31:23 -060016subdir('attn')
Zane Shelley248cbf82019-05-03 17:07:18 -050017
Ben Tyner8c2f8b22020-03-27 10:39:31 -050018pthread = declare_dependency(link_args : '-pthread')
19lrt = declare_dependency(link_args : '-lrt')
20
Ben Tynerd3cda742020-05-04 08:00:28 -050021no_listener_mode = get_option('nlmode')
22
23if not no_listener_mode.disabled()
24 executable('openpower-hw-diags', 'main_nl.cpp', 'cli.cpp',
25 link_with : [analyzer, attn],
26 install : true)
27else
28 executable('openpower-hw-diags', 'main.cpp', 'cli.cpp', 'listener.cpp',
29 dependencies : [lrt, pthread],
30 link_with : [analyzer, attn],
31 install : true)
32endif
Ben Tyner0205f3b2020-02-24 10:24:47 -060033
Zane Shelley248cbf82019-05-03 17:07:18 -050034build_tests = get_option('tests')
35
36if not build_tests.disabled()
37 subdir('test')
38endif