blob: 9453bbc25c2dd67e67c8529665e7179baae0780e [file] [log] [blame]
Ben Tyner941aaeb2019-04-26 17:38:10 -05001project('openpower-libhei', 'cpp',
Paul Greenwooddc47e0a2019-11-01 16:22:57 -05002 version: '0.1', meson_version: '>=0.50.0',
Ben Tyner941aaeb2019-04-26 17:38:10 -05003 default_options: [
4 'warning_level=3',
5 'werror=true',
Zane Shelley83a8d552020-05-07 15:08:52 -05006 'cpp_std=c++14',
Ben Tyner0fa81f72019-09-05 14:30:02 -05007 'cpp_args=-Wno-unused-parameter'
8 ])
Ben Tyner941aaeb2019-04-26 17:38:10 -05009
Ben Tyner032bf9e2020-05-06 21:27:54 -050010incdir = include_directories('src')
Ben Tyner941aaeb2019-04-26 17:38:10 -050011
Zane Shelleydd69c962020-05-05 22:19:11 -050012libhei_src = [
13 'src/chip_data/hei_chip_data.cpp',
14 'src/isolator/hei_isolator.cpp',
15 'src/isolator/hei_isolation_chip.cpp',
16 'src/isolator/hei_isolation_node.cpp',
17 'src/register/hei_hardware_register.cpp',
18 'src/util/hei_bit_string.cpp',
19]
Ben Tyner7c796052020-02-03 19:00:37 -060020
21libhei_dep = declare_dependency(include_directories : incdir,
22 sources : libhei_src)
23
Ben Tyner032bf9e2020-05-06 21:27:54 -050024# build static library libhei.a (note that the libray name is hei, the
25# resulting filename will be libhei.a)
26libhei_static = static_library('hei',
27 dependencies: libhei_dep,
28 install: true)
29
Zane Shelley3a02e242020-05-08 16:25:36 -050030install_headers(
31 'src/hei_chip.hpp',
32 'src/hei_isolation_data.hpp',
33 'src/hei_main.hpp',
34 'src/hei_signature.hpp',
35 'src/hei_types.hpp',
36 'src/hei_user_interface.hpp',
37 subdir : 'libhei'
38)
Ben Tyner032bf9e2020-05-06 21:27:54 -050039
40pkg_mod = import('pkgconfig')
41
42pkg_mod.generate(libraries : libhei_static,
43 version : '0.1',
44 name : 'libhei',
45 subdirs: 'libhei',
46 filebase : 'hei',
47 description : 'Openpower Hardware Error Isolator')
48
Zane Shelleyad103b92019-07-31 15:57:54 -050049build_tests = get_option('tests')
Ben Tyner941aaeb2019-04-26 17:38:10 -050050
Zane Shelleyad103b92019-07-31 15:57:54 -050051if not build_tests.disabled()
Zane Shelleyad103b92019-07-31 15:57:54 -050052 subdir('test')
Ben Tyner941aaeb2019-04-26 17:38:10 -050053endif