1project( 2 'witherspoon-pfault-analysis', 3 'cpp', 4 default_options: [ 5 'warning_level=3', 6 'werror=true', 7 'cpp_std=c++17' 8 ], 9 license: 'Apache-2.0', 10 version: '1.0', 11) 12 13build_tests = get_option('tests') 14 15cppfs = meson.get_compiler('cpp').find_library('stdc++fs') 16gmock = dependency('gmock', disabler: true, required: build_tests) 17gtest = dependency('gtest', main: true, disabler: true, required: build_tests) 18openpower_dbus_interfaces = dependency('openpower-dbus-interfaces') 19phosphor_dbus_interfaces = dependency('phosphor-dbus-interfaces') 20phosphor_logging = dependency('phosphor-logging') 21prog_python = import('python').find_installation('python3') 22sdbusplus = dependency('sdbusplus') 23sdbuspp = find_program('sdbus++') 24sdeventplus = dependency('sdeventplus') 25 26conf = configuration_data() 27conf.set_quoted( 28 'INPUT_HISTORY_BUSNAME_ROOT', get_option('input-history-busname-root')) 29conf.set_quoted( 30 'INPUT_HISTORY_SENSOR_ROOT', get_option('input-history-sensor-root')) 31conf.set10( 32 'UCD90160_DEVICE_ACCESS', get_option('ucd90160-access')) 33 34configure_file(output: 'config.h', configuration: conf) 35 36# Ensure the generated header here winds up in the correct path in the build 37# tree such that it actually get used and doesn't get found in the sysroot 38# somewhere. Meson doesn't allow path elements (rightfully so) when specifying 39# the output filename of a target definition so the target must be defined in 40# the directory where the artifacts need to be placed. Do that now, because 41# the generated source (cpp) is needed to define the library target. 42subdir('org/open_power/Witherspoon/Fault') 43 44libpower = static_library( 45 'power', 46 error_cpp, 47 error_hpp, 48 'gpio.cpp', 49 'pmbus.cpp', 50 'utility.cpp', 51 dependencies: [ 52 cppfs, 53 openpower_dbus_interfaces, 54 phosphor_dbus_interfaces, 55 phosphor_logging, 56 sdbusplus, 57 sdeventplus, 58 ], 59) 60 61subdir('power-sequencer') 62subdir('power-supply') 63subdir('test') 64