xref: /openbmc/google-misc/meson.build (revision 24c61c7ee8583830fd0916b7b2c7bf0561569e0f)
1dab96f13SBrandon Kim# Copyright 2021 Google LLC
2dab96f13SBrandon Kim#
3dab96f13SBrandon Kim# Licensed under the Apache License, Version 2.0 (the "License");
4dab96f13SBrandon Kim# you may not use this file except in compliance with the License.
5dab96f13SBrandon Kim# You may obtain a copy of the License at
6dab96f13SBrandon Kim#
7dab96f13SBrandon Kim#      http://www.apache.org/licenses/LICENSE-2.0
8dab96f13SBrandon Kim#
9dab96f13SBrandon Kim# Unless required by applicable law or agreed to in writing, software
10dab96f13SBrandon Kim# distributed under the License is distributed on an "AS IS" BASIS,
11dab96f13SBrandon Kim# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12dab96f13SBrandon Kim# See the License for the specific language governing permissions and
13dab96f13SBrandon Kim# limitations under the License.
14dab96f13SBrandon Kim
158745c956SWilliam A. Kennington IIIproject(
168745c956SWilliam A. Kennington III    'google-misc',
17ab79d7d9SWilliam A. Kennington III    'c',
188745c956SWilliam A. Kennington III    version: '0.1',
191dfe24eaSPatrick Williams    meson_version: '>=1.1.1',
208745c956SWilliam A. Kennington III    default_options: [
218745c956SWilliam A. Kennington III        'warning_level=3',
228745c956SWilliam A. Kennington III        'werror=true',
231dfe24eaSPatrick Williams        'cpp_std=c++23',
24ab79d7d9SWilliam A. Kennington III        'c_std=c18',
25ab79d7d9SWilliam A. Kennington III        'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'),
26*24c61c7eSPatrick Williams    ],
27*24c61c7eSPatrick Williams)
28ab79d7d9SWilliam A. Kennington III
29ab79d7d9SWilliam A. Kennington III# Dummy file to make code coverage happy
307f49370dSWilliam A. Kennington IIIif get_option('tests').allowed()
317f49370dSWilliam A. Kennington III    test('hello', executable('hello', 'hello.c'))
327f49370dSWilliam A. Kennington IIIendif
33ab79d7d9SWilliam A. Kennington III
34ab79d7d9SWilliam A. Kennington III# Meson has no feature option to str...
3547a0ada2SPatrick Williamstests_str = get_option('tests').allowed() ? 'enabled' : 'disabled'
36ab79d7d9SWilliam A. Kennington IIIif get_option('tests').auto()
37ab79d7d9SWilliam A. Kennington III    tests_str = 'auto'
38ab79d7d9SWilliam A. Kennington IIIendif
397d6fa42fSWilliam A. Kennington III
40e077427eSWilliam A. Kennington III# The ordering in this list intentionally lists dependencies higher than
41e077427eSWilliam A. Kennington III# dependents to guarantee their tests are enabled
42e077427eSWilliam A. Kennington IIIif not meson.is_subproject()
431285115cSWilliam A. Kennington III    subproject('acpi-power-state-daemon')
447d6fa42fSWilliam A. Kennington III    subproject('ncsid', default_options: 'tests=' + tests_str)
4503eba281SSui Chen    subproject('metrics-ipmi-blobs', default_options: 'tests=' + tests_str)
4614fe6698SNan Zhou    subproject('nemora-postd')
477a33704cSNan Zhou    subproject('libcr51sign')
483212f5dfSWilly Tu    subproject('dhcp-done')
49cc45be7cSJohn Wedig    subproject('espi-control')
50e077427eSWilliam A. Kennington IIIendif
51