Skip to content

Commit

Permalink
build: align with new c-util style
Browse files Browse the repository at this point in the history
Convert the repository to use the new meson-wrap based dependency
management, new meson functionality, as well as the new CI shared
workflows.

Signed-off-by: David Rheinsberg <[email protected]>
  • Loading branch information
dvdhrm committed May 3, 2022
1 parent a0970f1 commit 76900e4
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 19 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,19 @@ on:
jobs:
ci:
name: CI with Default Configuration
runs-on: ubuntu-latest

steps:
- name: Fetch Sources
uses: actions/checkout@v2
- name: Run through C-Util CI
uses: c-util/automation/src/ci-c-util@v1
with:
m32: 1
valgrind: 1
uses: bus1/cabuild/.github/workflows/ci-c-util.yml@v1
with:
cabuild_ref: "v1"
m32: true
matrixmode: true
valgrind: true

ci-msvc:
name: CI with MSVC
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2016, windows-latest]
os: [windows-2019, windows-latest]

steps:
- name: Fetch Sources
Expand Down
2 changes: 1 addition & 1 deletion AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AUTHORS-LGPL:
along with this program; If not, see <http://www.gnu.org/licenses/>.

COPYRIGHT: (ordered alphabetically)
Copyright (C) 2015-2019 Red Hat, Inc.
Copyright (C) 2015-2022 Red Hat, Inc.

AUTHORS: (ordered alphabetically)
Danilo Horta <[email protected]>
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# c-list - Circular Intrusive Double Linked List Collection

## CHANGES WITH 4:

* The minimum required meson version is now 0.60.0.

* TBD

Contributions from: David Rheinsberg

- TBD, YYYY-MM-DD

## CHANGES WITH 3:

* API break: The c_list_loop_*() symbols were removed, since we saw
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The requirements for this project are:

At build-time, the following software is required:

* `meson >= 0.41`
* `meson >= 0.60`
* `pkg-config >= 0.29`

### Build
Expand Down
37 changes: 34 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
project(
'c-list',
'c',
version: '3',
license: 'Apache',
default_options: [
'c_std=c99',
],
license: 'Apache',
meson_version: '>=0.60.0',
version: '3.0.0',
)
major = meson.project_version().split('.')[0]
project_description = 'Circular Intrusive Double Linked List Collection'

add_project_arguments('-D_GNU_SOURCE', language: 'c')
mod_pkgconfig = import('pkgconfig')

# See c-stdaux for details on these. We do not have c-stdaux as dependency, so
# we keep a duplicated set here, reduced to the minimum.
cflags = meson.get_compiler('c').get_supported_arguments(
'-D_GNU_SOURCE',

'-Wno-gnu-alignof-expression',
'-Wno-maybe-uninitialized',
'-Wno-unknown-warning-option',
'-Wno-unused-parameter',

'-Wno-error=type-limits',
'-Wno-error=missing-field-initializers',

'-Wdate-time',
'-Wdeclaration-after-statement',
'-Wlogical-op',
'-Wmissing-include-dirs',
'-Wmissing-noreturn',
'-Wnested-externs',
'-Wredundant-decls',
'-Wshadow',
'-Wstrict-aliasing=3',
'-Wsuggest-attribute=noreturn',
'-Wundef',
'-Wwrite-strings',
)
add_project_arguments(cflags, language: 'c')

subdir('src')

meson.override_dependency('libclist-'+major, libclist_dep, static: true)
6 changes: 3 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ if not meson.is_subproject()
install_headers('c-list.h')

mod_pkgconfig.generate(
version: meson.project_version(),
name: 'libclist',
filebase: 'libclist',
description: project_description,
filebase: 'libclist-'+major,
name: 'libclist',
version: meson.project_version(),
)
endif

Expand Down

0 comments on commit 76900e4

Please sign in to comment.