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 | |
Ben Tyner | 7c79605 | 2020-02-03 19:00:37 -0600 | [diff] [blame] | 12 | libhei_src = ['src/isolator/hei_isolator.cpp', |
| 13 | 'src/isolator/hei_isolation_node.cpp', |
| 14 | 'src/register/hei_hardware_register.cpp', |
| 15 | 'src/util/hei_bit_string.cpp'] |
| 16 | |
| 17 | libhei_dep = declare_dependency(include_directories : incdir, |
| 18 | sources : libhei_src) |
| 19 | |
Ben Tyner | 032bf9e | 2020-05-06 21:27:54 -0500 | [diff] [blame^] | 20 | # build static library libhei.a (note that the libray name is hei, the |
| 21 | # resulting filename will be libhei.a) |
| 22 | libhei_static = static_library('hei', |
| 23 | dependencies: libhei_dep, |
| 24 | install: true) |
| 25 | |
| 26 | install_headers('src/hei_chip.hpp', |
| 27 | 'src/hei_includes.hpp', |
| 28 | 'src/hei_isolation_data.hpp', |
| 29 | 'src/hei_macros.hpp', |
| 30 | 'src/hei_main.hpp', |
| 31 | 'src/hei_return_code.hpp', |
| 32 | 'src/hei_types.hpp', |
| 33 | 'src/hei_user_interface.hpp', |
| 34 | subdir : 'libhei') |
| 35 | |
| 36 | install_headers('src/isolator/hei_signature.hpp', |
| 37 | 'src/isolator/hei_isolator.hpp', |
| 38 | 'src/isolator/hei_isolation_node.hpp', |
| 39 | subdir : 'libhei/isolator') |
| 40 | |
| 41 | install_headers('src/register/hei_hardware_register.hpp', |
| 42 | 'src/register/hei_operator_register.hpp', |
| 43 | 'src/register/hei_scom_register.hpp', |
| 44 | 'src/register/hei_register.hpp', |
| 45 | subdir : 'libhei/register') |
| 46 | |
| 47 | install_headers('src/util/hei_bit_string.hpp', |
| 48 | 'src/util/hei_flyweight.hpp', |
| 49 | subdir : 'libhei/util') |
| 50 | |
| 51 | pkg_mod = import('pkgconfig') |
| 52 | |
| 53 | pkg_mod.generate(libraries : libhei_static, |
| 54 | version : '0.1', |
| 55 | name : 'libhei', |
| 56 | subdirs: 'libhei', |
| 57 | filebase : 'hei', |
| 58 | description : 'Openpower Hardware Error Isolator') |
| 59 | |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 60 | build_tests = get_option('tests') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 61 | |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 62 | if not build_tests.disabled() |
Zane Shelley | ad103b9 | 2019-07-31 15:57:54 -0500 | [diff] [blame] | 63 | subdir('test') |
Ben Tyner | 941aaeb | 2019-04-26 17:38:10 -0500 | [diff] [blame] | 64 | endif |