blob: 94dabd247a38e1de63979741f38fe2f58714bf65 [file] [log] [blame]
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -05001project(
2 'openpower-debug-collector',
3 'cpp',
Patrick Williams704170c2023-07-12 11:15:14 -05004 meson_version: '>=1.1.1',
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -05005 default_options: [
6 'warning_level=3',
7 'werror=true',
Patrick Williams704170c2023-07-12 11:15:14 -05008 'cpp_std=c++23'
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -05009 ],
10 license: 'Apache-2.0',
11 version: '1.0.0',
12)
13
Patrick Williamsdc54f512023-09-01 15:13:25 -050014cxx = meson.get_compiler('cpp')
15
Patrick Williamseebcf902022-09-13 11:20:56 -050016sdbusplus_dep = dependency('sdbusplus')
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050017
Patrick Williamsdc54f512023-09-01 15:13:25 -050018if cxx.has_header('CLI/CLI.hpp')
19 CLI11_dep = declare_dependency()
20else
21 CLI11_dep = dependency('CLI11')
22endif
23
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050024phosphorlogging = dependency(
25 'phosphor-logging',
26 fallback: [
27 'phosphor-logging',
28 'phosphor_logging_dep'
29 ]
30)
31
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050032realpath_prog = find_program('realpath')
33
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050034conf_data = configuration_data()
Patrick Williams377b35e2023-11-29 06:44:01 -060035if get_option('hostboot-dump-collection').allowed()
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050036 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 Teekappanavar1ac61622021-06-22 19:07:29 -050042 subdir('watchdog')
43else
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050044 conf_data.set('WATCHDOG_DUMP_COLLECTION', false)
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050045 watchdog_lib = []
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050046 extra_deps = []
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050047endif
48
deepakala-k407e5b62023-04-24 09:15:09 -050049configure_file(output: 'config.h', configuration: conf_data)
50
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050051deps = [
Patrick Williamsdc54f512023-09-01 15:13:25 -050052 CLI11_dep,
Patrick Williamseebcf902022-09-13 11:20:56 -050053 sdbusplus_dep,
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050054 phosphorlogging,
Shantappa Teekappanavar41d507e2021-10-05 12:17:55 -050055 extra_deps
56]
57
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050058executable('watchdog_timeout',
59 'watchdog_timeout.cpp',
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050060 dependencies: deps,
Shantappa Teekappanavar1ac61622021-06-22 19:07:29 -050061 link_with: watchdog_lib,
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050062 implicit_include_directories: true,
63 install: true
64)
65
66executable('checkstop_app',
67 'checkstop_app.cpp',
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050068 dependencies: deps,
Shantappa Teekappanavar222131c2021-06-02 10:52:56 -050069 implicit_include_directories: true,
70 install: true
71)