: "${CRYPTO:=no}"
: "${SMB:=no}"
: "${TCPDUMP_TAINTED:=no}"
+: "${TCPDUMP_CMAKE_TAINTED:=no}"
: "${MAKE_BIN:=make}"
. ./build_common.sh
[ "$TCPDUMP_TAINTED" != yes ] && CFLAGS=`cc_werr_cflags`
+# If necessary, set TCPDUMP_CMAKE_TAINTED here to exempt particular cmake from
+# warnings. Use as specific terms as possible (e.g. some specific version and
+# some specific OS).
+
+[ "$TCPDUMP_CMAKE_TAINTED" != yes ] && CMAKE_OPTIONS='-Werror=dev'
+
if [ "$CMAKE" = no ]; then
if [ "$BUILD_LIBPCAP" = yes ]; then
echo "Using PKG_CONFIG_PATH=$PKG_CONFIG_PATH"
run_after_echo mkdir build
run_after_echo cd build
if [ "$BUILD_LIBPCAP" = yes ]; then
- run_after_echo cmake -DWITH_CRYPTO="$CRYPTO" -DENABLE_SMB="$SMB" \
+ run_after_echo cmake "$CMAKE_OPTIONS" \
+ -DWITH_CRYPTO="$CRYPTO" -DENABLE_SMB="$SMB" \
${CFLAGS:+-DEXTRA_CFLAGS="$CFLAGS"} \
-DCMAKE_INSTALL_PREFIX="$PREFIX" -DCMAKE_PREFIX_PATH="$PREFIX" ..
LD_LIBRARY_PATH="$PREFIX/lib"
export LD_LIBRARY_PATH
else
- run_after_echo cmake -DWITH_CRYPTO="$CRYPTO" -DENABLE_SMB="$SMB" \
+ run_after_echo cmake "$CMAKE_OPTIONS" \
+ -DWITH_CRYPTO="$CRYPTO" -DENABLE_SMB="$SMB" \
${CFLAGS:+-DEXTRA_CFLAGS="$CFLAGS"} \
-DCMAKE_INSTALL_PREFIX="$PREFIX" ..
fi
: "${MATRIX_CMAKE:=no yes}"
: "${MATRIX_CRYPTO:=no yes}"
: "${MATRIX_SMB:=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.
+: "${TCPDUMP_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
fi
COUNT=0
export TCPDUMP_TAINTED
+export TCPDUMP_CMAKE_TAINTED
export MAKE_BIN
build_tcpdump() {