1project( 2 'openpower-debug-collector', 3 'cpp', 4 meson_version: '>=1.1.1', 5 default_options: [ 6 'warning_level=3', 7 'werror=true', 8 'cpp_std=c++23' 9 ], 10 license: 'Apache-2.0', 11 version: '1.0.0', 12) 13 14cxx = meson.get_compiler('cpp') 15 16systemd = dependency('systemd', required : true) 17 18sdbusplus_dep = dependency('sdbusplus') 19 20if cxx.has_header('CLI/CLI.hpp') 21 CLI11_dep = declare_dependency() 22else 23 CLI11_dep = dependency('CLI11') 24endif 25 26phosphorlogging = dependency( 27 'phosphor-logging', 28 fallback: [ 29 'phosphor-logging', 30 'phosphor_logging_dep' 31 ] 32) 33 34realpath_prog = find_program('realpath') 35 36conf_data = configuration_data() 37if get_option('hostboot-dump-collection').enabled() 38 conf_data.set('WATCHDOG_DUMP_COLLECTION', true) 39 extra_deps = [ 40 cxx.find_library('pdbg'), 41 cxx.find_library('libdt-api'), 42 cxx.find_library('phal') 43 ] 44 subdir('watchdog') 45else 46 conf_data.set('WATCHDOG_DUMP_COLLECTION', false) 47 watchdog_lib = [] 48 extra_deps = [] 49endif 50 51configure_file(output: 'config.h', configuration: conf_data) 52 53deps = [ 54 systemd, 55 CLI11_dep, 56 sdbusplus_dep, 57 phosphorlogging, 58 extra_deps 59] 60 61executable('watchdog_timeout', 62 'watchdog_timeout.cpp', 63 dependencies: deps, 64 link_with: watchdog_lib, 65 implicit_include_directories: true, 66 install: true 67) 68 69executable('checkstop_app', 70 'checkstop_app.cpp', 71 dependencies: deps, 72 implicit_include_directories: true, 73 install: true 74) 75