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
......@@ -14,11 +14,13 @@ cd "`dirname "${SCRIPTDIR}"`" > /dev/null
SCRIPTDIR="`pwd`";
popd > /dev/null
DEBUG=false
QUIET=false
while getopts :dq OPT; do
case $OPT in
d)
set -x
DEBUG=true
;;
q)
QUIET=true
......@@ -87,9 +89,27 @@ for var in $(compgen -e); do
MESON_ARGS+=("-D${MESON_BUILD_OPTION_NAME}=${MESON_BUILD_OPTION_VALUE}")
done
LOGFILE=$(mktemp --tmpdir=/var/tmp)
cleanup() {
rm -f "${LOGFILE}"
}
trap cleanup EXIT
if ! $QUIET; then
set -x
fi
exec meson --buildtype=${BUILDTYPE} \
meson --buildtype=${BUILDTYPE} \
${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.
Finish editing this message first!
Please register or to comment