aboutsummaryrefslogtreecommitdiff
path: root/build_matrix.sh
diff options
context:
space:
mode:
authorFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2022-11-30 11:00:49 +0100
committerFrancois-Xavier Le Bail <devel.fx.lebail@orange.fr>2022-11-30 11:25:16 +0100
commit0898548236721388d576d330971113eb23e2e517 (patch)
tree380ca8a7264c9c5df56b7c84a3edd478eeff449f /build_matrix.sh
parent16e1e243a9e9f03d8e8f4ee1067ba46795439a8d (diff)
CI: Introduce and use LIBPCAP_CMAKE_TAINTED
The new environment variable provides means to declare all or some libpcap cmake run of a specific environment (CI or a working copy) as tainted. Add explicit conditions to exempt the cmake run that emit warnings now and request the compiler to treat warnings as errors *iff* the cmake run is not tainted. This way if a cmake run that is warning-free now degrades later, CI will fail it. The treat warnings as errors cmake option used is: -Werror=dev Make developer warnings errors. Make warnings that are meant for the author of the CMake- Lists.txt files errors. By default this will also turn on depre- cated warnings as errors.
Diffstat (limited to 'build_matrix.sh')
-rwxr-xr-xbuild_matrix.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/build_matrix.sh b/build_matrix.sh
index 60065966..01ac3205 100755
--- a/build_matrix.sh
+++ b/build_matrix.sh
@@ -6,6 +6,12 @@
: "${MATRIX_CC:=gcc clang}"
: "${MATRIX_CMAKE:=no yes}"
: "${MATRIX_REMOTE:=no yes}"
+# Set this variable to "yes" before calling this script to disregard all cmake
+# warnings in a particular environment (CI or a local working copy). Set it
+# to "yes" in this script or in build.sh when a matrix subset is known to be
+# not cmake warning-free because of the version or whatever other factor
+# that the scripts can detect both in and out of CI.
+: "${LIBPCAP_CMAKE_TAINTED:=no}"
# Set this variable to "yes" before calling this script to disregard all
# warnings in a particular environment (CI or a local working copy). Set it
# to "yes" in this script or in build.sh when a matrix subset is known to be
@@ -28,6 +34,7 @@ if [ -z "$PREFIX" ]; then
fi
COUNT=0
export LIBPCAP_TAINTED
+export LIBPCAP_CMAKE_TAINTED
if command -v valgrind >/dev/null 2>&1; then
VALGRIND_CMD="valgrind --leak-check=full --error-exitcode=1"
export VALGRIND_CMD