Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 1 | project( |
| 2 | 'openpower-debug-collector', |
| 3 | 'cpp', |
Patrick Williams | 704170c | 2023-07-12 11:15:14 -0500 | [diff] [blame] | 4 | meson_version: '>=1.1.1', |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 5 | default_options: [ |
| 6 | 'warning_level=3', |
| 7 | 'werror=true', |
Patrick Williams | 704170c | 2023-07-12 11:15:14 -0500 | [diff] [blame] | 8 | 'cpp_std=c++23' |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 9 | ], |
| 10 | license: 'Apache-2.0', |
| 11 | version: '1.0.0', |
| 12 | ) |
| 13 | |
Patrick Williams | dc54f51 | 2023-09-01 15:13:25 -0500 | [diff] [blame] | 14 | cxx = meson.get_compiler('cpp') |
| 15 | |
Patrick Williams | eebcf90 | 2022-09-13 11:20:56 -0500 | [diff] [blame] | 16 | sdbusplus_dep = dependency('sdbusplus') |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 17 | |
Patrick Williams | dc54f51 | 2023-09-01 15:13:25 -0500 | [diff] [blame] | 18 | if cxx.has_header('CLI/CLI.hpp') |
| 19 | CLI11_dep = declare_dependency() |
| 20 | else |
| 21 | CLI11_dep = dependency('CLI11') |
| 22 | endif |
| 23 | |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 24 | phosphorlogging = dependency( |
| 25 | 'phosphor-logging', |
| 26 | fallback: [ |
| 27 | 'phosphor-logging', |
| 28 | 'phosphor_logging_dep' |
| 29 | ] |
| 30 | ) |
| 31 | |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 32 | realpath_prog = find_program('realpath') |
| 33 | |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 34 | conf_data = configuration_data() |
Patrick Williams | 377b35e | 2023-11-29 06:44:01 -0600 | [diff] [blame^] | 35 | if get_option('hostboot-dump-collection').allowed() |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 36 | conf_data.set('WATCHDOG_DUMP_COLLECTION', true) |
| 37 | extra_deps = [ |
| 38 | cxx.find_library('pdbg'), |
| 39 | cxx.find_library('libdt-api'), |
| 40 | cxx.find_library('phal') |
| 41 | ] |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 42 | subdir('watchdog') |
| 43 | else |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 44 | conf_data.set('WATCHDOG_DUMP_COLLECTION', false) |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 45 | watchdog_lib = [] |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 46 | extra_deps = [] |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 47 | endif |
| 48 | |
deepakala-k | 407e5b6 | 2023-04-24 09:15:09 -0500 | [diff] [blame] | 49 | configure_file(output: 'config.h', configuration: conf_data) |
| 50 | |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 51 | deps = [ |
Patrick Williams | dc54f51 | 2023-09-01 15:13:25 -0500 | [diff] [blame] | 52 | CLI11_dep, |
Patrick Williams | eebcf90 | 2022-09-13 11:20:56 -0500 | [diff] [blame] | 53 | sdbusplus_dep, |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 54 | phosphorlogging, |
Shantappa Teekappanavar | 41d507e | 2021-10-05 12:17:55 -0500 | [diff] [blame] | 55 | extra_deps |
| 56 | ] |
| 57 | |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 58 | executable('watchdog_timeout', |
| 59 | 'watchdog_timeout.cpp', |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 60 | dependencies: deps, |
Shantappa Teekappanavar | 1ac6162 | 2021-06-22 19:07:29 -0500 | [diff] [blame] | 61 | link_with: watchdog_lib, |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 62 | implicit_include_directories: true, |
| 63 | install: true |
| 64 | ) |
| 65 | |
| 66 | executable('checkstop_app', |
| 67 | 'checkstop_app.cpp', |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 68 | dependencies: deps, |
Shantappa Teekappanavar | 222131c | 2021-06-02 10:52:56 -0500 | [diff] [blame] | 69 | implicit_include_directories: true, |
| 70 | install: true |
| 71 | ) |