blob: 352e5e46a098b55ea1aa87010e444fd76f57dfe3 [file] [log] [blame]
Zane Shelleyf480b732020-06-11 10:05:16 -05001# See README.md for details.
Zane Shelley248cbf82019-05-03 17:07:18 -05002project('openpower-hw-diags', 'cpp',
3 version: '0.1', meson_version: '>=0.49.0',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
Ben Tyner92e39fd2020-02-05 18:11:02 -06007 'cpp_std=c++17',
8 'cpp_args=-Wno-unused-parameter'
Zane Shelley248cbf82019-05-03 17:07:18 -05009 ])
10
Zane Shelleyf480b732020-06-11 10:05:16 -050011# First, look if the libhei library has already been built and installed. If
12# not, default to the subproject.
13libhei_dep = dependency('hei', fallback : ['libhei', 'libhei_dep'])
Ben Tyner92e39fd2020-02-05 18:11:02 -060014
Ben Tyner0205f3b2020-02-24 10:24:47 -060015incdir = include_directories('.')
16
17subdir('analyzer')
Ben Tyneref320152020-01-09 10:31:23 -060018subdir('attn')
Zane Shelley248cbf82019-05-03 17:07:18 -050019
Ben Tyner8c2f8b22020-03-27 10:39:31 -050020pthread = declare_dependency(link_args : '-pthread')
21lrt = declare_dependency(link_args : '-lrt')
22
Ben Tynerd3cda742020-05-04 08:00:28 -050023no_listener_mode = get_option('nlmode')
24
25if not no_listener_mode.disabled()
26 executable('openpower-hw-diags', 'main_nl.cpp', 'cli.cpp',
27 link_with : [analyzer, attn],
28 install : true)
29else
30 executable('openpower-hw-diags', 'main.cpp', 'cli.cpp', 'listener.cpp',
31 dependencies : [lrt, pthread],
32 link_with : [analyzer, attn],
33 install : true)
34endif
Ben Tyner0205f3b2020-02-24 10:24:47 -060035
Zane Shelley248cbf82019-05-03 17:07:18 -050036build_tests = get_option('tests')
37
38if not build_tests.disabled()
39 subdir('test')
40endif