diff --git a/.evergreen/build_all.sh b/.evergreen/build_all.sh index 1621b8891..ad9a6e5d5 100755 --- a/.evergreen/build_all.sh +++ b/.evergreen/build_all.sh @@ -13,6 +13,7 @@ echo "Begin compile process" _cxxflags="" : "${CONFIGURE_ONLY:=}" +: "${LIBMONGOCRYPT_BUILD_TYPE:=RelWithDebInfo}" if [ "$OS_NAME" = "windows" ]; then # Enable exception handling for MSVC @@ -38,8 +39,6 @@ if [ "$MACOS_UNIVERSAL" = "ON" ]; then ADDITIONAL_CMAKE_FLAGS="$ADDITIONAL_CMAKE_FLAGS -DCMAKE_OSX_ARCHITECTURES='arm64;x86_64'" fi -: "${CMAKE:=cmake}" - for suffix in "dll" "dylib" "so"; do cand="$(abspath "$LIBMONGOCRYPT_DIR/../mongocrypt_v1.$suffix")" if test -f "$cand"; then @@ -56,7 +55,7 @@ common_cmake_args=( -DCMAKE_C_FLAGS="$LIBMONGOCRYPT_EXTRA_CFLAGS" -DCMAKE_CXX_FLAGS="$LIBMONGOCRYPT_EXTRA_CFLAGS $_cxxflags" -DCMAKE_EXPORT_COMPILE_COMMANDS=ON - -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_BUILD_TYPE="$LIBMONGOCRYPT_BUILD_TYPE" -H"$LIBMONGOCRYPT_DIR" -B"$build_dir" ) @@ -81,10 +80,10 @@ if [ "$CONFIGURE_ONLY" ]; then exit 0; fi echo "Installing libmongocrypt" -run_cmake --build "$build_dir" --target install --config RelWithDebInfo -run_cmake --build "$build_dir" --target test-mongocrypt --config RelWithDebInfo -run_cmake --build "$build_dir" --target test_kms_request --config RelWithDebInfo -run_chdir "$build_dir" run_ctest -C RelWithDebInfo +run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_cmake --build "$build_dir" --target test-mongocrypt --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_cmake --build "$build_dir" --target test_kms_request --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE" # MONGOCRYPT-372, ensure macOS universal builds contain both x86_64 and arm64 architectures. if [ "$MACOS_UNIVERSAL" = "ON" ]; then @@ -114,9 +113,9 @@ run_cmake \ -DCMAKE_INSTALL_PREFIX="$MONGOCRYPT_INSTALL_PREFIX/nocrypto" \ "${common_cmake_args[@]}" -run_cmake --build "$build_dir" --target install --config RelWithDebInfo -run_cmake --build "$build_dir" --target test-mongocrypt --config RelWithDebInfo -run_chdir "$build_dir" run_ctest -C RelWithDebInfo +run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_cmake --build "$build_dir" --target test-mongocrypt --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE" # Build and install libmongocrypt without statically linking libbson run_cmake \ @@ -125,5 +124,5 @@ run_cmake \ -DCMAKE_INSTALL_PREFIX="$MONGOCRYPT_INSTALL_PREFIX/sharedbson" \ "${common_cmake_args[@]}" -run_cmake --build "$build_dir" --target install --config RelWithDebInfo -run_chdir "$build_dir" run_ctest -C RelWithDebInfo +run_cmake --build "$build_dir" --target install --config "$LIBMONGOCRYPT_BUILD_TYPE" +run_chdir "$build_dir" run_ctest -C "$LIBMONGOCRYPT_BUILD_TYPE"