-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
104 lines (86 loc) · 2.9 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -----------------------------------------------------------------------------
#
# This file is part of the µOS++ distribution.
# (https://github.com/micro-os-plus/)
# Copyright (c) 2021 Liviu Ionescu
#
# Permission to use, copy, modify, and/or distribute this software
# for any purpose is hereby granted, under the terms of the MIT license.
#
# If a copy of the license was not distributed with this file, it can
# be obtained from https://opensource.org/licenses/MIT/.
#
# -----------------------------------------------------------------------------
# This file is intended to be consumed by applications with:
#
# `subdir('xpacks/@micro-os-plus/diag-trace')`
#
# The result is a dependency that can be referred as:
#
# `dependencies: [micro_os_plus_diag_trace_dependency],`
# Note: the meson configuration is provided only as a proof of concept,
# for production it might need some refinements.
# -----------------------------------------------------------------------------
message('Processing xPack @micro-os-plus/diag-trace...')
xpack_common_args = []
xpack_c_args = []
xpack_cpp_args = []
xpack_include_directories = []
xpack_sources = []
xpack_compile_definitions = []
# -----------------------------------------------------------------------------
xpack_common_args += [
# '-Wno-padded',
# parameter passing for argument of type '...' changed in GCC 7.1
# '-Wno-psabi'
]
if c_compiler.get_id() == 'gcc'
xpack_common_args += [
# '-Wno-aggregate-return',
]
elif c_compiler.get_id().contains('clang')
xpack_common_args += [
# '-Wno-c++98-c++11-c++14-c++17-compat-pedantic',
# '-Wno-c++98-c++11-compat',
# '-Wno-c++98-compat',
# '-Wno-c++98-compat-pedantic',
# '-Wno-c99-extensions',
# '-Wno-pedantic',
# '-Wno-exit-time-destructors',
# '-Wno-ctad-maybe-unsupported',
# '-Wno-global-constructors',
# '-Wno-extra-semi-stmt',
]
endif
xpack_cpp_args += [
]
if c_compiler.get_id() == 'gcc'
xpack_cpp_args += [
]
endif
xpack_include_directories += [
'include',
]
xpack_sources += [
'src/trace.cpp',
]
# https://mesonbuild.com/Reference-manual.html#declare_dependency
micro_os_plus_diag_trace_dependency = declare_dependency(
include_directories: include_directories(xpack_include_directories),
sources: files(xpack_sources),
compile_args: xpack_common_args,
dependencies: []
)
# Dependencies cannot store language specific definitions, the only
# way is to pass them via global variables. All applications including
# this dependency must also consider them.
# micro_os_plus_diag_trace_dependency_c_args = xpack_c_args
# micro_os_plus_diag_trace_dependency_cpp_args = xpack_cpp_args
foreach name : xpack_include_directories
message('+ -I ' + name)
endforeach
foreach name : xpack_sources + xpack_common_args
message('+ ' + name)
endforeach
message('> micro_os_plus_diag_trace_dependency')
# -----------------------------------------------------------------------------