diff --git a/build-scripts/build-linux b/build-scripts/build-linux index a1216b9..139117b 100755 --- a/build-scripts/build-linux +++ b/build-scripts/build-linux @@ -20,6 +20,9 @@ done cd .. # Perform additional tests on header files. ./build-scripts/check-headers +# Perform additional tests on private header files. +./build-scripts/check-private-headers +# Create distribution export TMPDIR=$PWD/dist-tmp rm -rf $TMPDIR ./make_dist --ci diff --git a/build-scripts/check-private-headers b/build-scripts/check-private-headers new file mode 100755 index 0000000..dc8cab4 --- /dev/null +++ b/build-scripts/check-private-headers @@ -0,0 +1,35 @@ +#!/bin/bash +set -eo pipefail +cd "$(dirname $0)/.." + +trap "rm -f a.cc" EXIT +declare -a pheaders +cd libqpdf +for i in qpdf/*.hh; do + if [[ ! $i =~ .*auto_.* ]] && ! grep -q >/dev/null 2>&1 QPDFOBJECT_OLD_HH $i; then + pheaders+=($i) + fi +done +cd .. +# Make sure each header file can be included in isolation and that the +# result can be compiled with the version of the C++ standard used by the qpdf project, currently C++-20. +declare -a perrors +for i in "${pheaders[@]}"; do + rm -f a.cc + cat > a.cc < C++-17 changes snuck into any public - headers. + - Attempt to detect if any > C++17 changes snuck into any public + headers and check all private headers compile stand-alone. - CLI Enhancements