Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ Changes prior to 3.9.0 are documented as [release notes on GitHub](https://githu

## 3.11.0 [Unreleased]

<!-- Will contain entries for the next minor release -->
### Changed

- `FetchContent_MakeAvailable()` is used to populate dependencies instead of `FetchContent_Populate()` for the Mongo C Driver (when not provided by `CMAKE_PREFIX_PATH`) and mnmlstc/core (when automatically selected or `BSONCXX_POLY_USE_MNMLSTC=ON`).
- Note: `FetchContent_Populate()` is still used for mnmlstc/core for CMake versions prior to 3.18 to avoid `add_subdirectory()` behavior.

### Deprecated

Expand Down Expand Up @@ -71,6 +74,7 @@ accordance with [MongoDB Software Lifecycle Schedules](https://www.mongodb.com/l
- Add VERSIONINFO resource to bsoncxx.dll and mongocxx.dll.

### Changed

- Do not build tests as part of `all` target. Configure with `BUILD_TESTING=ON` to build tests.
- Bump minimum required CMake version to 3.15 to support the FetchContent module and for consistency with the C Driver.
- Improve handling of downloaded (non-system) mnmlstc/core as the polyfill library.
Expand All @@ -79,11 +83,13 @@ accordance with [MongoDB Software Lifecycle Schedules](https://www.mongodb.com/l
- Bump minimum C Driver version to [1.25.0](https://github.com/mongodb/mongo-c-driver/releases/tag/1.25.0).

### Fixed

- Explicitly document that throwing an exception from an APM callback is undefined behavior.
- Do not prematurely install mnmlstc/core headers during the CMake build step.
- Require a C Driver CMake package is found via `find_dependency()` for all installed CXX Driver package configurations.

### Removed

- Remove support for exported targets from the CMake project build tree.
- Drop support for the following operating systems:
- macOS 10.14 and 10.15
Expand Down
8 changes: 7 additions & 1 deletion cmake/FetchMnmlstcCore.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ FetchContent_Declare(
EP_mnmlstc_core

SOURCE_DIR "${core-src}"
SOURCE_SUBDIR "" # Disable `add_subdirectory()` in `FetchContent_MakeAvailable()`.
SUBBUILD_DIR "${core-subbuild}"
BINARY_DIR "${core-build}"
INSTALL_DIR "${core-install}"
Expand All @@ -32,7 +33,12 @@ if(core_FOUND AND "$CACHE{INTERNAL_MONGOC_MNMLSTC_CORE_FOUND}")
else()
if(NOT ep_mnmlstc_core_POPULATED)
message(STATUS "Downloading mnmlstc/core...")
FetchContent_Populate(EP_mnmlstc_core)
if("${CMAKE_VERSION}" VERSION_LESS "3.18.0")
# SOURCE_SUBDIR is not yet supported.
FetchContent_Populate(EP_mnmlstc_core)
else()
FetchContent_MakeAvailable(EP_mnmlstc_core)
endif()
message(STATUS "Downloading mnmlstc/core... done.")
endif()

Expand Down
4 changes: 1 addition & 3 deletions cmake/FetchMongoC.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ if(NOT mongo-c-driver_POPULATED)

set(ENABLE_EXTRA_ALIGNMENT OFF)

FetchContent_Populate(mongo-c-driver)

# Set ENABLE_TESTS to OFF to disable the test-libmongoc target in the C driver.
# This prevents the LoadTests.cmake script from attempting to execute test-libmongoc.
# test-libmongoc is not built with the "all" target.
Expand All @@ -31,7 +29,7 @@ if(NOT mongo-c-driver_POPULATED)
set(BUILD_TESTING OFF)
string(REPLACE " -Werror" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
string(REPLACE " -Werror" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
add_subdirectory(${mongo-c-driver_SOURCE_DIR} ${mongo-c-driver_BINARY_DIR})
FetchContent_MakeAvailable(mongo-c-driver)
set(CMAKE_CXX_FLAGS ${OLD_CMAKE_CXX_FLAGS})
set(CMAKE_C_FLAGS ${OLD_CMAKE_C_FLAGS})
set(ENABLE_TESTS ${OLD_ENABLE_TESTS})
Expand Down