Skip to content

Commit 900a2a2

Browse files
Comment and message tweaks
1 parent ff0093c commit 900a2a2

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ include (MongoSettings)
1212
# Subcomponents:
1313
mongo_bool_setting(ENABLE_MONGOC "Enable the build of the mongo-c-driver libraries")
1414
mongo_bool_setting(ENABLE_BSON "Enable the build of the C BSON handling libraries")
15+
if(ENABLE_BSON STREQUAL "SYSTEM")
16+
message(SEND_ERROR "ENABLE_BSON=SYSTEM is no longer supported. Use USE_SYSTEM_LIBBSON=ON instead.")
17+
endif()
1518

1619
# Static libraries:
1720
mongo_setting(
@@ -50,7 +53,7 @@ mongo_bool_setting(ENABLE_MAN_PAGES "Build the manual pages" DEFAULT VALUE OFF)
5053
mongo_bool_setting(ENABLE_HTML_DOCS "Build the HTML documentation" DEFAULT VALUE OFF)
5154
mongo_bool_setting(ENABLE_UNINSTALL "Generate an 'uninstall' script and an 'uninstall' build target")
5255

53-
# Optional features that are ENABLED by default:
56+
# Optional features that are ENABLED when necessary dependencies are found:
5457
mongo_setting(ENABLE_SRV "Toggle support for mongodb+srv URIs."
5558
OPTIONS ON OFF AUTO
5659
DEFAULT VALUE AUTO)
@@ -64,9 +67,8 @@ mongo_setting(ENABLE_ZLIB "Enable zlib compression support"
6467
OPTIONS BUNDLED SYSTEM OFF
6568
DEFAULT VALUE BUNDLED)
6669
mongo_setting(
67-
ENABLE_SSL [[Enable TLS connection and SCRAM-SHA-1 authentication.
68-
Note that SCRAM-SHA1 is required for authenticating to
69-
MongoDB 3.0 or later.]]
70+
ENABLE_SSL [[Enable TLS connection and SCRAM authentication. Note that SCRAM
71+
is required for authenticating to MongoDB 3.0 or later.]]
7072
OPTIONS WINDOWS DARWIN OPENSSL LIBRESSL OFF AUTO
7173
DEFAULT VALUE AUTO
7274
VALIDATE CODE [[
@@ -147,7 +149,7 @@ mongo_bool_setting(
147149
DEFAULT VALUE OFF
148150
VALIDATE CODE [[
149151
if(ENABLE_CRYPTO_SYSTEM_PROFILE AND NOT ENABLE_SSL STREQUAL "OPENSSL")
150-
message(WARNING "ENABLE_CRYPTO_SYSTEM_PROFILE=TRUE is only aplicable when ENABLE_SSL=OPENSSL")
152+
message(WARNING "ENABLE_CRYPTO_SYSTEM_PROFILE=TRUE is only applicable when ENABLE_SSL=OPENSSL")
151153
endif()
152154
]]
153155
)
@@ -161,7 +163,7 @@ mongo_bool_setting(
161163
VALIDATE CODE [[
162164
if(ENABLE_AUTOMATIC_INIT_AND_CLEANUP)
163165
if(NOT CMAKE_C_COMPILER_ID STREQUAL "GNU")
164-
message(WARNING "Automatic init-and-cleanup is only supported on GCC")
166+
message(WARNING "ENABLE_AUTOMATIC_INIT_AND_CLEANUP is only supported on GCC.")
165167
endif()
166168
message(DEPRECATION
167169
"Enabling ENABLE_AUTOMATIC_INIT_AND_CLEANUP is deprecated and "

build/cmake/MongoSettings.cmake

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,14 +256,13 @@ Define a new boolean build setting::
256256

257257
This is a shorthand for defining a boolean setting. See mongo_setting() for more
258258
option information. The TYPE of the setting will be BOOL, and the implicit
259-
default value for the setting will be ON if neither DEFAULT nor DEFAULT_EVAL are
260-
specified.
259+
default value for the setting will be ON if no DEFAULT is provided.
261260

262261
]==]
263262
function(mongo_bool_setting name doc)
264263
set(args ${ARGN})
265264
# Inject "ON" as a default:
266-
if(NOT "DEFAULT" IN_LIST args AND NOT "DEFAULT_EVAL" IN_LIST args)
265+
if(NOT "DEFAULT" IN_LIST args)
267266
list(APPEND args DEFAULT VALUE ON)
268267
endif()
269268
mongo_setting("${name}" "${doc}" TYPE BOOL ${args})

0 commit comments

Comments
 (0)