Skip to content

Commit 18107c1

Browse files
committed
merge master
2 parents 1d317aa + 8a0ffd5 commit 18107c1

File tree

6 files changed

+14
-12
lines changed

6 files changed

+14
-12
lines changed

.mci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ functions:
283283
add_expansions_to_env: true
284284
script: mongo-cxx-driver/.evergreen/install_c_driver.sh
285285

286-
# This function may be used to fetch CI scripts in the C driver
286+
# fetch_c_driver_source may be used to fetch the C driver source without installing the C driver.
287+
# This can be used when only CI scripts are needed.
287288
"fetch_c_driver_source":
288289
- command: shell.exec
289290
params:
@@ -857,6 +858,7 @@ tasks:
857858
RUN_DISTCHECK: 1
858859
- func: "clone_drivers-evergreen-tools"
859860
- func: "run_kms_servers"
861+
# Call "install_c_driver" before "test" to build static C driver libraries. Example projects require static C driver libraries.
860862
- func: "install_c_driver"
861863
- func: "test"
862864

CMakeLists.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,12 @@ To build static libraries only, set both BUILD_SHARED_LIBS and BUILD_SHARED_AND_
198198
endif()
199199

200200

201-
# If the user did not customize the install prefix,
202-
# set it to live under build so we don't inadvertently pollute /usr/local
203-
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
201+
option(USE_DEFAULT_INSTALL_PATH "Override the CMake default installation path" OFF)
202+
if(NOT CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND USE_DEFAULT_INSTALL_PATH)
203+
message(FATAL_ERROR "You cannot set both CMAKE_INSTALL_PREFIX and USE_DEFAULT_INSTALL_PATH")
204+
endif()
205+
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND NOT USE_DEFAULT_INSTALL_PATH)
206+
message(WARNING "the CMake default install path is being overridden to the build directory. This behavior will not be the default in a future release. Build with -DUSE_DEFAULT_INSTALL_PATH=ON to opt into what will be the default behavior in a future release. Setting install path to: ${CMAKE_BINARY_DIR}/install")
204207
set (CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "default install path" FORCE)
205208
endif()
206209

docs/content/mongocxx-v3/installation/linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ from source. To configure `mongocxx` for installation into `/usr/local` as well,
7171
```
7272
cmake .. \
7373
-DCMAKE_BUILD_TYPE=Release \
74-
-DCMAKE_INSTALL_PREFIX=/usr/local
74+
-DUSE_DEFAULT_INSTALL_PATH=ON
7575
```
7676

7777
These options can be freely mixed with a C++17 polyfill option. For instance, this is how a user
@@ -80,7 +80,7 @@ would run the command above with the Boost polyfill option:
8080
cmake .. \
8181
-DCMAKE_BUILD_TYPE=Release \
8282
-DBSONCXX_POLY_USE_BOOST=1 \
83-
-DCMAKE_INSTALL_PREFIX=/usr/local
83+
-DUSE_DEFAULT_INSTALL_PATH=ON
8484
```
8585

8686
### Step 4: Build and install the driver

docs/content/mongocxx-v3/installation/macos.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ from source. To configure `mongocxx` for installation into `/usr/local` as well,
7171
```
7272
cmake .. \
7373
-DCMAKE_BUILD_TYPE=Release \
74-
-DCMAKE_INSTALL_PREFIX=/usr/local
74+
-DUSE_DEFAULT_INSTALL_PATH=ON
7575
```
7676

7777
These options can be freely mixed with a C++17 polyfill option. For instance, this is how a user
@@ -80,7 +80,7 @@ would run the command above with the Boost polyfill option:
8080
cmake .. \
8181
-DCMAKE_BUILD_TYPE=Release \
8282
-DBSONCXX_POLY_USE_BOOST=1 \
83-
-DCMAKE_INSTALL_PREFIX=/usr/local
83+
-DUSE_DEFAULT_INSTALL_PATH=ON
8484
```
8585

8686
### Step 4: Build and install the driver

src/bsoncxx/enums/binary_sub_type.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ BSONCXX_ENUM(uuid, 0x04)
2424
BSONCXX_ENUM(md5, 0x05)
2525
BSONCXX_ENUM(encrypted, 0x06)
2626
BSONCXX_ENUM(column, 0x07)
27+
BSONCXX_ENUM(sensitive, 0x08)
2728
BSONCXX_ENUM(user, 0x80)

src/bsoncxx/types.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,6 @@ BSONCXX_INLINE bool operator==(const b_int32& lhs, const b_int32& rhs) {
570570
///
571571
/// A BSON replication timestamp value.
572572
///
573-
/// @warning
574-
/// This BSON type is used internally by the MongoDB server - use by clients
575-
/// is discouraged.
576-
///
577573
struct BSONCXX_API b_timestamp {
578574
static constexpr auto type_id = type::k_timestamp;
579575

0 commit comments

Comments
 (0)