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 16sdbusplus_dep = dependency('sdbusplus') 17 18if cxx.has_header('CLI/CLI.hpp') 19 CLI11_dep = declare_dependency() 20else 21 CLI11_dep = dependency('CLI11') 22endif 23 24phosphorlogging = dependency( 25 'phosphor-logging', 26 fallback: [ 27 'phosphor-logging', 28 'phosphor_logging_dep' 29 ] 30) 31 32realpath_prog = find_program('realpath') 33 34conf_data = configuration_data() 35if get_option('hostboot-dump-collection').enabled() 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 ] 42 subdir('watchdog') 43else 44 conf_data.set('WATCHDOG_DUMP_COLLECTION', false) 45 watchdog_lib = [] 46 extra_deps = [] 47endif 48 49configure_file(output: 'config.h', configuration: conf_data) 50 51deps = [ 52 CLI11_dep, 53 sdbusplus_dep, 54 phosphorlogging, 55 extra_deps 56] 57 58executable('watchdog_timeout', 59 'watchdog_timeout.cpp', 60 dependencies: deps, 61 link_with: watchdog_lib, 62 implicit_include_directories: true, 63 install: true 64) 65 66executable('checkstop_app', 67 'checkstop_app.cpp', 68 dependencies: deps, 69 implicit_include_directories: true, 70 install: true 71) 72