Skip to content
Snippets Groups Projects
Commit 9ace7f56 authored by Florian Schmaus's avatar Florian Schmaus
Browse files

[repare-build-dir] Check for unknown meson options

Meson does only emit a warning if unknown options are passed. In our
case, this is always something we should take care of, because an
option we assumed we configured, had no effect.

See also https://github.com/mesonbuild/meson/pull/8658
parent 1610b369
No related branches found
No related tags found
No related merge requests found
Pipeline #60802 passed
...@@ -14,11 +14,13 @@ cd "`dirname "${SCRIPTDIR}"`" > /dev/null ...@@ -14,11 +14,13 @@ cd "`dirname "${SCRIPTDIR}"`" > /dev/null
SCRIPTDIR="`pwd`"; SCRIPTDIR="`pwd`";
popd > /dev/null popd > /dev/null
DEBUG=false
QUIET=false QUIET=false
while getopts :dq OPT; do while getopts :dq OPT; do
case $OPT in case $OPT in
d) d)
set -x set -x
DEBUG=true
;; ;;
q) q)
QUIET=true QUIET=true
...@@ -87,9 +89,27 @@ for var in $(compgen -e); do ...@@ -87,9 +89,27 @@ for var in $(compgen -e); do
MESON_ARGS+=("-D${MESON_BUILD_OPTION_NAME}=${MESON_BUILD_OPTION_VALUE}") MESON_ARGS+=("-D${MESON_BUILD_OPTION_NAME}=${MESON_BUILD_OPTION_VALUE}")
done done
LOGFILE=$(mktemp --tmpdir=/var/tmp)
cleanup() {
rm -f "${LOGFILE}"
}
trap cleanup EXIT
if ! $QUIET; then if ! $QUIET; then
set -x set -x
fi fi
exec meson --buildtype=${BUILDTYPE} \
meson --buildtype=${BUILDTYPE} \
${MESON_ARGS[@]} \ ${MESON_ARGS[@]} \
"${ABSOLUTE_BUILDDIR}" "${ABSOLUTE_BUILDDIR}" |\
tee "${LOGFILE}"
if ! $DEBUG; then
set +x
fi
if grep -F "WARNING: Unknown options:" "${LOGFILE}"; then
echo "ERROR: Unknown meson options found"
rm -r "${ABSOLUTE_BUILDDIR}" "${ABSOLUTE_BUILDDIR_SYMLINK}"
exit 1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment