Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 1 | project('openpower-libhei', 'cpp', |
Paul Greenwood | dc47e0a | 2019-11-01 16:22:57 -0500 | [diff] [blame] | 2 | version: '0.1', meson_version: '>=0.50.0', |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 3 | default_options: [ |
| 4 | 'warning_level=3', |
| 5 | 'werror=true', |
Zane Shelley | 83a8d55 | 2020-05-07 15:08:52 -0500 | [diff] [blame] | 6 | 'cpp_std=c++14', |
Ben Tyner | 0fa81f7 | 2019-09-05 14:30:02 -0500 | [diff] [blame] | 7 | 'cpp_args=-Wno-unused-parameter' |
| 8 | ]) |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 9 | |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 10 | incdir = include_directories('src') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 11 | |
Zane Shelley | dd69c96 | 2020-05-05 22:19:11 -0500 | [diff] [blame] | 12 | libhei_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 Tyner | 7c79605 | 2020-02-03 19:00:37 -0600 | [diff] [blame] | 20 | |
| 21 | libhei_dep = declare_dependency(include_directories : incdir, |
| 22 | sources : libhei_src) |
| 23 | |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 24 | # build static library libhei.a (note that the libray name is hei, the |
| 25 | # resulting filename will be libhei.a) |
| 26 | libhei_static = static_library('hei', |
| 27 | dependencies: libhei_dep, |
| 28 | install: true) |
| 29 | |
Zane Shelley | 3a02e24 | 2020-05-08 16:25:36 -0500 | [diff] [blame] | 30 | install_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 Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame] | 39 | |
| 40 | pkg_mod = import('pkgconfig') |
| 41 | |
| 42 | pkg_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 Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 49 | build_tests = get_option('tests') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 50 | |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 51 | if not build_tests.disabled() |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 52 | subdir('test') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 53 | endif |