From c98f86900548f6bb870f5758343005018f40f4df Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Thu, 2 Jan 2025 12:18:22 -0600 Subject: [PATCH] Do not compile with system libmongoc during integration tests --- .evergreen/scripts/compile.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.evergreen/scripts/compile.sh b/.evergreen/scripts/compile.sh index 274a7de482..126f661a94 100755 --- a/.evergreen/scripts/compile.sh +++ b/.evergreen/scripts/compile.sh @@ -103,6 +103,11 @@ cmake_flags=( -DENABLE_UNINSTALL=ON ) +# System-installed libmongoc must not prevent fetch-and-build of libmongoc. +if [[ -z "$(find "${mongoc_prefix:?}" -name 'bson-config.h')" ]]; then + cmake_flags+=("-DCMAKE_DISABLE_FIND_PACKAGE_mongoc-1.0=ON") +fi + _RUN_DISTCHECK="" case "${OSTYPE:?}" in cygwin) @@ -271,7 +276,7 @@ if [[ -n "$(find "${mongoc_prefix:?}" -name 'bson-config.h')" ]]; then exit 1 } fi -else +elif [[ -n "$(find install -name 'bson-config.h')" ]]; then if [[ "${BSON_EXTRA_ALIGNMENT:-}" == "1" ]]; then grep -R "#define BSON_EXTRA_ALIGN 1" install || { echo "BSON_EXTRA_ALIGN is not 1 despite BSON_EXTRA_ALIGNMENT=1" 1>&2 @@ -283,4 +288,7 @@ else exit 1 } fi +else + echo "unexpectedly compiled using a system libmongoc library" 1>&2 + exit 1 fi