meson.build (c252894d1fe965a331d7625394ed9d82fd0a8ac2) meson.build (d9573f489eae420fc73709ed62eabb68dad444ff)
1# See README.md for details.
2project('openpower-hw-diags', 'cpp',
3 version: '0.1', meson_version: '>=0.49.0',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
7 'cpp_std=c++17',
8 'cpp_args=-Wno-unused-parameter'
9 ])
10
1# See README.md for details.
2project('openpower-hw-diags', 'cpp',
3 version: '0.1', meson_version: '>=0.49.0',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
7 'cpp_std=c++17',
8 'cpp_args=-Wno-unused-parameter'
9 ])
10
11#-------------------------------------------------------------------------------
12# Compiler
13#-------------------------------------------------------------------------------
14
11cmplr = meson.get_compiler('cpp')
12
15cmplr = meson.get_compiler('cpp')
16
13# First, look if the libhei library has already been built and installed. If
14# not, default to the subproject.
17#-------------------------------------------------------------------------------
18# Include directories
19#-------------------------------------------------------------------------------
20
21# Only using the base directory. All header includes should provide the full
22# path from the base directory.
23incdir = include_directories('.')
24
25#-------------------------------------------------------------------------------
26# External library dependencies
27#-------------------------------------------------------------------------------
28
29# Look if the libhei library has already been built and installed. If not,
30# default to the subproject.
15libhei_dep = dependency('hei', fallback : ['libhei', 'libhei_dep'])
16
17sdbusplus_dep = dependency('sdbusplus', version : '>=1.0')
18dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
19
20libpdbg_dep = cmplr.find_library('pdbg')
21
31libhei_dep = dependency('hei', fallback : ['libhei', 'libhei_dep'])
32
33sdbusplus_dep = dependency('sdbusplus', version : '>=1.0')
34dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
35
36libpdbg_dep = cmplr.find_library('pdbg')
37
22incdir = include_directories('.')
23
24# See if phosphor-logging is available, if not use test case logging code. This
25# allows for local builds outside of CI test sandbox.
26h = 'phosphor-logging/log.hpp'
27if cmplr.compiles('#include <@0@>'.format(h), name : '#include <@0@>'.format(h))
28 test_arg = []
29 phosphor_logging = true
30else
31 test_arg = [
32 '-DTEST_TRACE',
33 ]
34 phosphor_logging = false
35endif
36
37pthread = declare_dependency(link_args : '-pthread')
38lrt = declare_dependency(link_args : '-lrt')
39
40#-------------------------------------------------------------------------------
38# See if phosphor-logging is available, if not use test case logging code. This
39# allows for local builds outside of CI test sandbox.
40h = 'phosphor-logging/log.hpp'
41if cmplr.compiles('#include <@0@>'.format(h), name : '#include <@0@>'.format(h))
42 test_arg = []
43 phosphor_logging = true
44else
45 test_arg = [
46 '-DTEST_TRACE',
47 ]
48 phosphor_logging = false
49endif
50
51pthread = declare_dependency(link_args : '-pthread')
52lrt = declare_dependency(link_args : '-lrt')
53
54#-------------------------------------------------------------------------------
41# Build the static libraries
55# Build the local static libraries
42#-------------------------------------------------------------------------------
43
44subdir('analyzer')
45subdir('attn')
46subdir('util')
47
48hwdiags_libs = [
49 analyzer_lib,

--- 32 unchanged lines hidden ---
56#-------------------------------------------------------------------------------
57
58subdir('analyzer')
59subdir('attn')
60subdir('util')
61
62hwdiags_libs = [
63 analyzer_lib,

--- 32 unchanged lines hidden ---