1project(
2  'metrics-ipmi-blobs',
3  'cpp',
4  version: '0.1',
5  default_options: [
6    'cpp_std=c++17',
7  ],
8)
9
10add_project_arguments(
11  '-Wno-unused-parameter',
12  language:'cpp')
13
14protoc = find_program('protoc', required: true)
15
16gen = generator(protoc,
17  output: [
18    '@BASENAME@.pb.cc', '@BASENAME@.pb.h'
19  ],
20  arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@'])
21generated = gen.process(['metricblob.proto'])
22
23shared_library(
24  'metrics',
25  'main.cpp',
26  'handler.cpp',
27  'metric.cpp',
28  'util.cpp',
29  generated,
30  install: true,
31  install_dir: '/usr/lib/blob-ipmid/',
32  dependencies: [
33    dependency('phosphor-logging'),
34    dependency('phosphor-ipmi-blobs'),
35    dependency('protobuf'),
36  ],
37  version: '0',
38)
39
40gtest_dep = dependency('gtest')
41text_executable = executable('testprog', [
42    'test/util_test.cpp', 'util.cpp'],
43    dependencies: [ gtest_dep, dependency('phosphor-logging') ])
44test('gtest test', text_executable)
45