meson: Use 'meson setup' to configure

This removes a deprecation warning when using 'meson' without 'setup'.
This commit is contained in:
René de Hesselle 2023-08-14 13:24:28 +02:00 committed by Philip Withnall
parent 73efc47ddd
commit 0c73ff3a08
4 changed files with 18 additions and 18 deletions

View File

@ -107,7 +107,7 @@ fedora-x86_64:
variables: variables:
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs" CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
--default-library=both --default-library=both
--prefix=$HOME/glib-installed --prefix=$HOME/glib-installed
@ -154,7 +154,7 @@ debian-stable-x86_64:
stage: build stage: build
needs: [] needs: []
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
--default-library=both --default-library=both
--prefix=$HOME/glib-installed --prefix=$HOME/glib-installed
@ -187,7 +187,7 @@ installed-tests:
needs: [] needs: []
script: script:
# dtrace is disabled because it breaks the static-link.py test # dtrace is disabled because it breaks the static-link.py test
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
--prefix=/usr --libdir=/usr/lib64 --prefix=/usr --libdir=/usr/lib64
-Dinstalled_tests=true -Dinstalled_tests=true
@ -224,7 +224,7 @@ G_DISABLE_ASSERT:
stage: build stage: build
needs: [] needs: []
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
-Dsystemtap=true -Dsystemtap=true
-Ddtrace=true -Ddtrace=true
@ -256,7 +256,7 @@ valgrind:
variables: variables:
MESON_TEST_TIMEOUT_MULTIPLIER: 15 MESON_TEST_TIMEOUT_MULTIPLIER: 15
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
-Dsystemtap=true -Dsystemtap=true
-Ddtrace=true -Ddtrace=true
@ -298,7 +298,7 @@ cross-android_arm64:
image: $FEDORA_IMAGE image: $FEDORA_IMAGE
script: script:
# FIXME: add --werror # FIXME: add --werror
- meson ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build - meson setup ${MESON_COMMON_OPTIONS} --cross-file=.gitlab-ci/cross_file_android_arm64_31.txt _build
- ninja -C _build - ninja -C _build
cross-mingw64: cross-mingw64:
@ -310,7 +310,7 @@ cross-mingw64:
PYTHONUTF8: "1" PYTHONUTF8: "1"
script: script:
# FIXME: Add --werror # FIXME: Add --werror
- meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build - meson setup ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_mingw64.txt _build
- ninja -C _build - ninja -C _build
artifacts: artifacts:
reports: reports:
@ -474,7 +474,7 @@ freebsd-12-x86_64:
# FreeBSD supports xattr, but its API is different from Linux xattr. # FreeBSD supports xattr, but its API is different from Linux xattr.
# FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404 # FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
# localstatedir is needed for access to /var/lib/dbus/machine-id # localstatedir is needed for access to /var/lib/dbus/machine-id
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
- ninja -C _build - ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh - bash -x ./.gitlab-ci/run-tests.sh
artifacts: artifacts:
@ -503,7 +503,7 @@ freebsd-13-x86_64:
before_script: before_script:
- bash .gitlab-ci/show-execution-environment.sh - bash .gitlab-ci/show-execution-environment.sh
script: script:
- meson ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build - meson setup ${MESON_COMMON_OPTIONS} --localstatedir=/var -Db_lundef=false -Dxattr=false _build
- ninja -C _build - ninja -C _build
- bash -x ./.gitlab-ci/run-tests.sh - bash -x ./.gitlab-ci/run-tests.sh
artifacts: artifacts:
@ -557,7 +557,7 @@ macos-x86_64:
# already contains the dependencies. See: # already contains the dependencies. See:
# - https://gitlab.gnome.org/GNOME/glib/merge_requests/388 # - https://gitlab.gnome.org/GNOME/glib/merge_requests/388
# - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225 # - https://gitlab.gnome.org/Infrastructure/Infrastructure/issues/225
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--wrap-mode=default --wrap-mode=default
--werror --werror
_build _build
@ -606,7 +606,7 @@ scan-build:
stage: analysis stage: analysis
needs: [] needs: []
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
--default-library=both --default-library=both
--prefix=$HOME/glib-installed --prefix=$HOME/glib-installed
@ -635,7 +635,7 @@ scan-build:
# cov-build doesnt like GLIB_DEPRECATED_ENUMERATOR # cov-build doesnt like GLIB_DEPRECATED_ENUMERATOR
CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS' CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
script: script:
- meson ${MESON_COMMON_OPTIONS} - meson setup ${MESON_COMMON_OPTIONS}
--werror --werror
--default-library=both --default-library=both
--prefix=$HOME/glib-installed --prefix=$HOME/glib-installed
@ -679,7 +679,7 @@ dist-job:
- git submodule update --init - git submodule update --init
- for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done - for m in $(git submodule foreach -q 'echo $path'); do git config --global --add safe.directory "${PWD}/${m}"; done
- meson subprojects download - meson subprojects download
- meson ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build - meson setup ${MESON_COMMON_OPTIONS} --buildtype release -Dgtk_doc=true -Dman=true _build
- cd _build - cd _build
- ninja dist - ninja dist
- ninja glib-doc gobject-doc gio-doc - ninja glib-doc gobject-doc gio-doc

View File

@ -13,7 +13,7 @@ set args=%args:~1%
:: FIXME: make warnings fatal :: FIXME: make warnings fatal
pip3 install --upgrade --user meson==1.0.0 || goto :error pip3 install --upgrade --user meson==1.0.0 || goto :error
meson %args% _build || goto :error meson setup %args% _build || goto :error
python .gitlab-ci/check-missing-install-tag.py _build || goto :error python .gitlab-ci/check-missing-install-tag.py _build || goto :error
ninja -C _build || goto :error ninja -C _build || goto :error

View File

@ -35,10 +35,10 @@ export PATH CFLAGS
if [[ "$MSYSTEM" == "CLANG64" ]]; then if [[ "$MSYSTEM" == "CLANG64" ]]; then
# FIXME: fix the clang build warnings # FIXME: fix the clang build warnings
# shellcheck disable=SC2086 # shellcheck disable=SC2086
meson ${MESON_COMMON_OPTIONS} _build meson setup ${MESON_COMMON_OPTIONS} _build
else else
# shellcheck disable=SC2086 # shellcheck disable=SC2086
meson ${MESON_COMMON_OPTIONS} --werror _build meson setup ${MESON_COMMON_OPTIONS} --werror _build
fi fi
cd _build cd _build

View File

@ -22,14 +22,14 @@
is thus: is thus:
<literallayout> <literallayout>
<userinput>meson _build</userinput> <userinput>meson setup _build</userinput>
<userinput>ninja -C _build</userinput> <userinput>ninja -C _build</userinput>
<userinput>ninja -C _build install</userinput> <userinput>ninja -C _build install</userinput>
</literallayout> </literallayout>
On FreeBSD: On FreeBSD:
<literallayout> <literallayout>
<userinput>env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--disable-new-dtags" meson -Dxattr=false -Dinstalled_tests=true -Db_lundef=false _build</userinput> <userinput>env CPPFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib -Wl,--disable-new-dtags" meson setup -Dxattr=false -Dinstalled_tests=true -Db_lundef=false _build</userinput>
<userinput>ninja -C _build</userinput> <userinput>ninja -C _build</userinput>
</literallayout> </literallayout>
</para> </para>