blob: e4ef613163166e5163c1ed2d770bfc6c8d858d2e [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 Tynerb859d792020-05-06 21:29:47 -050010libhei_dep = dependency('hei', required : true)
Ben Tyner92e39fd2020-02-05 18:11:02 -060011
Ben Tyner0205f3b2020-02-24 10:24:47 -060012incdir = include_directories('.')
13
14subdir('analyzer')
Ben Tyneref320152020-01-09 10:31:23 -060015subdir('attn')
Zane Shelley248cbf82019-05-03 17:07:18 -050016
Ben Tyner8c2f8b22020-03-27 10:39:31 -050017pthread = declare_dependency(link_args : '-pthread')
18lrt = declare_dependency(link_args : '-lrt')
19
Ben Tynerd3cda742020-05-04 08:00:28 -050020no_listener_mode = get_option('nlmode')
21
22if not no_listener_mode.disabled()
23 executable('openpower-hw-diags', 'main_nl.cpp', 'cli.cpp',
24 link_with : [analyzer, attn],
25 install : true)
26else
27 executable('openpower-hw-diags', 'main.cpp', 'cli.cpp', 'listener.cpp',
28 dependencies : [lrt, pthread],
29 link_with : [analyzer, attn],
30 install : true)
31endif
Ben Tyner0205f3b2020-02-24 10:24:47 -060032
Zane Shelley248cbf82019-05-03 17:07:18 -050033build_tests = get_option('tests')
34
35if not build_tests.disabled()
36 subdir('test')
37endif