Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
ignore:
- "src/third_party"
4 changes: 2 additions & 2 deletions .evergreen/scripts/build_snapshot_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ build_dir=$(basename $(pwd))
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --clean
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --init
mock_root=$(sudo mock -r ${config} --use-bootstrap-image --isolation=simple --print-root-path)
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --install rpmdevtools git rpm-build cmake utf8proc boost-devel openssl-devel cyrus-sasl-devel libbson-devel mongo-c-driver-devel snappy-devel gcc-c++ libzstd-devel
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --install rpmdevtools git rpm-build cmake utf8proc openssl-devel cyrus-sasl-devel libbson-devel mongo-c-driver-devel snappy-devel gcc-c++ libzstd-devel
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --copyin "$(pwd)" "$(pwd)/${spec_file}" /tmp
if [ ! -f build/VERSION_CURRENT ]; then
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --cwd "/tmp/${build_dir}" --chroot -- /bin/sh -c "(
Expand Down Expand Up @@ -105,7 +105,7 @@ sudo mock -r ${config} --use-bootstrap-image --isolation=simple --copyout "/tmp/
sudo mock -r ${config} --use-bootstrap-image --isolation=simple --cwd "/tmp/${build_dir}" --chroot -- /bin/sh -c "(
[ -d build ] || mkdir build ;
cd build ;
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DBSONCXX_POLY_USE_BOOST=1 -DENABLE_UNINSTALL=OFF -DENABLE_TESTS=OFF .. ;
/usr/bin/cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_UNINSTALL=OFF -DENABLE_TESTS=OFF .. ;
make -j 8 dist
)"

Expand Down
5 changes: 1 addition & 4 deletions .evergreen/scripts/compile-scan-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,10 @@ scan_build_flags=(
--use-cc "${CC:?}"
--use-c++ "${CXX:?}"
-analyze-headers
--exclude "$(pwd)/build/src/bsoncxx/third_party/_deps" # mnmlstc
--exclude "$(pwd)/build/_deps" # mongoc
--exclude "$(pwd)/build/_deps" # mongoc
)

case "${BSONCXX_POLYFILL:-}" in
mnmlstc) cmake_flags+=("-DBSONCXX_POLY_USE_MNMLSTC=ON") ;;
boost) cmake_flags+=("-DBSONCXX_POLY_USE_BOOST=ON") ;;
impls) cmake_flags+=("-DBSONCXX_POLY_USE_IMPLS=ON") ;;
std) cmake_flags+=("-DBSONCXX_POLY_USE_STD=ON") ;;
esac
Expand Down
11 changes: 1 addition & 10 deletions .evergreen/scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ if [[ -f "${mongoc_prefix:?}/.evergreen/scripts/find-ccache.sh" ]]; then
find_ccache_and_export_vars "$(pwd)" || true
fi


build_targets=()
cmake_build_opts=()
case "${OSTYPE:?}" in
Expand Down Expand Up @@ -109,8 +108,7 @@ _RUN_DISTCHECK=""
case "${OSTYPE:?}" in
cygwin)
case "${generator:-}" in
*2015*) cmake_flags+=("-DBOOST_ROOT=C:/local/boost_1_60_0") ;;
*2017* | *2019*) cmake_flags+=("-DCMAKE_CXX_STANDARD=17") ;;
*2015* | *2017* | *2019* | *2022*) ;;
*)
echo "missing explicit CMake Generator on Windows distro" 1>&2
exit 1
Expand All @@ -132,8 +130,6 @@ export CMAKE_GENERATOR="${generator:?}"
export CMAKE_GENERATOR_PLATFORM="${platform:-}"

case "${BSONCXX_POLYFILL:-}" in
mnmlstc) cmake_flags+=("-DBSONCXX_POLY_USE_MNMLSTC=ON") ;;
boost) cmake_flags+=("-DBSONCXX_POLY_USE_BOOST=ON") ;;
impls) cmake_flags+=("-DBSONCXX_POLY_USE_IMPLS=ON") ;;
std) cmake_flags+=("-DBSONCXX_POLY_USE_STD=ON") ;;
*) ;;
Expand Down Expand Up @@ -201,11 +197,6 @@ if [[ "${OSTYPE:?}" != cygwin ]]; then
)
fi

# Ignore warnings generated by core::optional in mnmlstc/core.
if [[ "${OSTYPE:?}" == linux* && "${HOSTTYPE:?}" == powerpc64le ]]; then
cxx_flags+=(-Wno-error=maybe-uninitialized)
fi

# Ignore deprecation warnings when building on a release branch.
if [[ "$(echo "${branch_name:?}" | cut -f2 -d'/')" != "${branch_name:?}" ]]; then
cc_flags+=(-Wno-deprecated-declarations)
Expand Down
13 changes: 5 additions & 8 deletions .evergreen/scripts/debian_package_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ if [ "${IS_PATCH}" = "true" ]; then
git log -n1 -p
fi
fi
if [ "${DEB_BUILD_PROFILES#*pkg.mongo-cxx-driver.mnmlstc}" != "${DEB_BUILD_PROFILES}" ]; then
MNMLSTC_INCLUDE="-I/usr/include/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc "
fi

export CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"

Expand All @@ -55,7 +52,7 @@ export DEBOOTSTRAP_DIR=`pwd`/debootstrap.git
sudo -E ./debootstrap.git/debootstrap --variant=buildd unstable ./unstable-chroot/ http://cdn-aws.deb.debian.org/debian
cp -a mongo-cxx-driver ./unstable-chroot/tmp/
sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/bash -c "
(apt-get install -y ca-certificates cmake debhelper doxygen git libboost-dev libsasl2-dev libsnappy-dev libssl-dev libutf8proc-dev pkgconf zlib1g-dev build-essential curl fakeroot furo git-buildpackage python3-sphinx python3-sphinx-design python3-packaging && \
(apt-get install -y ca-certificates cmake debhelper doxygen git libsasl2-dev libsnappy-dev libssl-dev libutf8proc-dev pkgconf zlib1g-dev build-essential curl fakeroot furo git-buildpackage python3-sphinx python3-sphinx-design python3-packaging && \
mkdir /tmp/mongo-c-driver && \
cd /tmp/mongo-c-driver && \
curl -o deb.tar.gz -L https://s3.amazonaws.com/mciuploads/mongo-c-driver/master/mongo-c-driver-debian-packages-latest.tar.gz && \
Expand All @@ -77,10 +74,10 @@ sudo DEB_BUILD_PROFILES="${DEB_BUILD_PROFILES}" chroot ./unstable-chroot /bin/ba
LANG=C /bin/bash -x ./debian/build_snapshot.sh && \
debc ../*.changes && \
dpkg -i ../*.deb && \
/usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o runcommand_examples examples/mongocxx/mongodb.com/runcommand_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o aggregation_examples examples/mongocxx/mongodb.com/aggregation_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o index_examples examples/mongocxx/mongodb.com/index_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ ${MNMLSTC_INCLUDE:-}-I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o documentation_examples examples/mongocxx/mongodb.com/documentation_examples.cpp -lmongocxx -lbsoncxx )"
/usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o runcommand_examples examples/mongocxx/mongodb.com/runcommand_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o aggregation_examples examples/mongocxx/mongodb.com/aggregation_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o index_examples examples/mongocxx/mongodb.com/index_examples.cpp -lmongocxx -lbsoncxx && \
/usr/bin/g++ -I/usr/include/bsoncxx/v_noabi -I/usr/include/mongocxx/v_noabi -I. -o documentation_examples examples/mongocxx/mongodb.com/documentation_examples.cpp -lmongocxx -lbsoncxx )"

[ -e ./unstable-chroot/tmp/mongo-cxx-driver/runcommand_examples ] || (echo "Example 'runcommand_examples' was not built!" ; exit 1)
[ -e ./unstable-chroot/tmp/mongo-cxx-driver/aggregation_examples ] || (echo "Example 'aggregation_examples' was not built!" ; exit 1)
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu

## Removed

- Support for external polyfill libraries.
- `ENABLE_BSONCXX_POLY_USE_IMPLS=ON` is now implicit behavior.
- The following CMake options are no longer supported:
- `ENABLE_BSONCXX_POLY_USE_IMPLS`
- `BSONCXX_POLY_USE_MNMLSTC`
- `BSONCXX_POLY_USE_MNMLSTC_SYSTEM`
- `BSONCXX_POLY_USE_BOOST`
- Support for CMake option `MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX`.
- `MONGOCXX_OVERRIDE_DEFAULT_INSTALL_PREFIX=OFF` is now implicit behavior.
- Redeclarations of `bsoncxx::stdx` interfaces in the `mongocxx::stdx` namespace.
Expand Down
19 changes: 0 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ option(BUILD_SHARED_LIBS_WITH_STATIC_MONGOC
OFF
)

# Allow the user to opt into using bsoncxx implementations for C++17 polyfills by default.
option(ENABLE_BSONCXX_POLY_USE_IMPLS "Enable using bsoncxx implementations of C++17 polyfills for pre-C++17 configurations by default" OFF)

if(DEFINED CACHE{ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES} AND NOT MSVC)
message(WARNING "ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES is an MSVC-only option and will be ignored by the current configuration")
unset(ENABLE_ABI_TAG_IN_LIBRARY_FILENAMES CACHE)
Expand Down Expand Up @@ -412,22 +409,6 @@ if(NOT(TARGET dist OR TARGET distcheck))
list(APPEND polyfill_flags "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}")
endif()

if(NOT "${BOOST_ROOT}" STREQUAL "")
list(APPEND polyfill_flags "-DBOOST_ROOT=${BOOST_ROOT}")
endif()

if(NOT "${BSONCXX_POLY_USE_MNMLSTC}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_MNMLSTC=${BSONCXX_POLY_USE_MNMLSTC}")
endif()

if(NOT "${BSONCXX_POLY_USE_SYSTEM_MNMLSTC}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_SYSTEM_MNMLSTC=${BSONCXX_POLY_USE_SYSTEM_MNMLSTC}")
endif()

if(NOT "${BSONCXX_POLY_USE_BOOST}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_BOOST=${BSONCXX_POLY_USE_BOOST}")
endif()

if(NOT "${BSONCXX_POLY_USE_IMPLS}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_IMPLS=${BSONCXX_POLY_USE_IMPLS}")
endif()
Expand Down
17 changes: 0 additions & 17 deletions THIRD-PARTY-NOTICES
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,3 @@ Copyright Catch2 Authors

Distributed under the Boost Software License, Version 1.0.
See http://www.boost.org/LICENSE_1_0.txt

2) License Notice for the MNMLSTC library
-----------------------------------------
[Note: MNMLSTC is the default polyfill. If configured, it is downloaded
and compiled during the build.]

Copyright (c) 2013 - 2015 MNMLSTC

Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this software except in compliance with the License. You may obtain a
copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
21 changes: 1 addition & 20 deletions cmake/BsoncxxUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,10 @@ function(bsoncxx_add_library TARGET OUTPUT_NAME LINK_TYPE)
endif()

# Library used for C++17 polyfills:
# - 'm' for mnmlstc/core.
# - 'b' for Boost.
# - 'i' for bsoncxx implementations.
# - 's' for standard library (no polyfill).
if(1)
if(BSONCXX_POLY_USE_MNMLSTC)
set(polyfill "m")
elseif(BSONCXX_POLY_USE_BOOST)
set(polyfill "b")
elseif(BSONCXX_POLY_USE_IMPLS)
if(BSONCXX_POLY_USE_IMPLS)
set(polyfill "i")
elseif(BSONCXX_POLY_USE_STD)
set(polyfill "s")
Expand Down Expand Up @@ -140,19 +134,6 @@ function(bsoncxx_add_library TARGET OUTPUT_NAME LINK_TYPE)
target_compile_definitions(${TARGET} PUBLIC BSONCXX_STATIC)
endif()

if(BSONCXX_POLY_USE_MNMLSTC AND NOT BSONCXX_POLY_USE_SYSTEM_MNMLSTC)
target_include_directories(
${TARGET}
SYSTEM
PUBLIC
$<BUILD_INTERFACE:${CORE_INCLUDE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/bsoncxx/v_noabi/bsoncxx/third_party/mnmlstc>
)
elseif(BSONCXX_POLY_USE_BOOST)
find_package(Boost 1.56.0 REQUIRED)
target_link_libraries(${TARGET} PUBLIC Boost::boost)
endif()

target_link_libraries(${TARGET} PRIVATE ${libbson_target})
target_include_directories(${TARGET} PRIVATE ${libbson_include_directories})
target_include_directories(
Expand Down
1 change: 0 additions & 1 deletion cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ add_subdirectory(make_dist)
set(cmake_MODULES
BsoncxxUtil.cmake
FetchCatch2.cmake
FetchMnmlstcCore.cmake
FetchMongoC.cmake
MacroGuardTest.cmake
MongocxxUtil.cmake
Expand Down
112 changes: 0 additions & 112 deletions cmake/FetchMnmlstcCore.cmake

This file was deleted.

16 changes: 0 additions & 16 deletions cmake/make_dist/MakeDistCheck.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,6 @@ function(RUN_DIST_CHECK PACKAGE_PREFIX EXT)
list(APPEND polyfill_flags "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}")
endif()

if(NOT "${BOOST_ROOT}" STREQUAL "")
list(APPEND polyfill_flags "-DBOOST_ROOT=${BOOST_ROOT}")
endif()

if(NOT "${BSONCXX_POLY_USE_MNMLSTC}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_MNMLSTC=${BSONCXX_POLY_USE_MNMLSTC}")
endif()

if(NOT "${BSONCXX_POLY_USE_SYSTEM_MNMLSTC}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_SYSTEM_MNMLSTC=${BSONCXX_POLY_USE_SYSTEM_MNMLSTC}")
endif()

if(NOT "${BSONCXX_POLY_USE_BOOST}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_BOOST=${BSONCXX_POLY_USE_BOOST}")
endif()

if(NOT "${BSONCXX_POLY_USE_IMPLS}" STREQUAL "")
list(APPEND polyfill_flags "-DBSONCXX_POLY_USE_IMPLS=${BSONCXX_POLY_USE_IMPLS}")
endif()
Expand Down
Loading