@@ -2,8 +2,6 @@ include_guard(DIRECTORY)
2
2
3
3
#[[ Bool: Set to TRUE if the environment variable MONGODB_DEVELOPER is a true value ]]
4
4
set (MONGODB_DEVELOPER FALSE )
5
- #[[ Bool: Set to TRUE if the environment variable MONGODB_BUILD_AUDIT is a true value ]]
6
- set (MONGODB_BUILD_AUDIT FALSE )
7
5
8
6
# Detect developer mode:
9
7
set (_is_dev "$ENV{MONGODB_DEVELOPER} " )
@@ -12,19 +10,12 @@ if(_is_dev)
12
10
set (MONGODB_DEVELOPER TRUE )
13
11
endif ()
14
12
15
- # Detect audit mode:
16
- set (_is_audit "$ENV{MONGODB_BUILD_AUDIT} " )
17
- if (_is_audit )
18
- message (STATUS "MONGODB_BUILD_AUDIT is enabled" )
19
- set (MONGODB_BUILD_AUDIT TRUE )
20
- endif ()
21
-
22
13
#[==[
23
14
Define a new configure-time build setting::
24
15
mongo_setting(
25
16
<name> <doc>
26
17
[TYPE <BOOL|PATH|FILEPATH|STRING>]
27
- [DEFAULT [[DEVEL|AUDIT ] [VALUE <value> | EVAL <code>]] ...]
18
+ [DEFAULT [[DEVEL] [VALUE <value> | EVAL <code>]] ...]
28
19
[OPTIONS [<opts> ...]]
29
20
[VALIDATE [CODE <code>]]
30
21
[ADVANCED] [ALLOW_OTHER_VALUES]
@@ -45,26 +36,27 @@ TYPE <BOOL|PATH|FILEPATH|STRING>
45
36
ALLOW_OTHER_VALUES is not specified, this call will validate that the
46
37
setting is a valid boolean value .
47
38
48
- OPTIONS [<opts> ...]
39
+ OPTIONS [<opts> [ ...] ]
49
40
Specify the valid set of values available for this setting. This will set
50
41
the STRINGS property on the cache variable and add an information message to
51
42
the doc string . Unless ALLOW_OTHER_VALUES is specified, this call will also
52
43
validate that the setting's value is one of these options , failing with an
53
44
error if it is not .
54
45
55
- DEFAULT [[DEVEL|AUDIT] [VALUE <value> | EVAL <code>]] ...
56
- Specify the default value of the generated variable . If given VALUE , then
46
+ DEFAULT [[DEVEL] [VALUE <value> | EVAL <code>]]
47
+ [...]
48
+ Specify the default value (s ) of the generated variable . If given VALUE , then
57
49
`<value>` will be used as the default, otherwise if given EVAL, `<code>`
58
50
will be executed and is expected to define a variable DEFAULT that will
59
- contain the default value .
60
-
61
- - If neither MONGODB_DEVELOPER nor MONGODB_BUILD_AUDIT are true , then the
62
- non-qualified defaults will be used. (If no non-qualified defaults are
63
- provided, then the default value is an empty string . )
64
- - Otherwise, If DEVEL defaults are provided, and MONGODB_DEVELOPER is true ,
51
+ contain the default value . An optional DEVEL qualifier may be given before
52
+ a default value specifier. If both qualified and unqualified defaults are
53
+ given, the unqualified default must appear first in the argument list .
54
+
55
+ - If MONGODB_DEVELOPER is not true , then the non-qualified default will be
56
+ used. (If no non-qualified defaults are provided, then the default value
57
+ is an empty string . )
58
+ - Otherwise, If DEVEL defaults are provided and MONGODB_DEVELOPER is true ,
65
59
then the DEVEL defaults will be used.
66
- - Otherwise, if AUDIT defaults are provided, and either MONGODB_DEVELOPER or
67
- MONGODB_BUILD_AUDIT is true , then the AUDIT defaults will be used.
68
60
69
61
VALIDATE [CODE <code>]
70
62
If specified, then `<code>` will be evaluated after the setting value is
@@ -200,7 +192,7 @@ function(_mongo_compute_default outvar arglist)
200
192
unset ("${outvar} " PARENT_SCOPE )
201
193
202
194
# Parse arguments:
203
- cmake_parse_arguments (dflt "" "" "DEVEL;AUDIT " ${arglist} )
195
+ cmake_parse_arguments (dflt "" "" "DEVEL" ${arglist} )
204
196
205
197
# Developer-mode options:
206
198
if (DEFINED dflt_DEVEL AND MONGODB_DEVELOPER )
@@ -209,13 +201,6 @@ function(_mongo_compute_default outvar arglist)
209
201
message (DEBUG "Detected MONGODB_DEVELOPER: Default of ${setting_NAME} is “${tmp} ”" )
210
202
set ("${outvar} " "${tmp} " PARENT_SCOPE )
211
203
return ()
212
- # Audit-mode options:
213
- elseif (DEFINED dflt_AUDIT AND (MONGODB_DEVELOPER OR MONGODB_BUILD_AUDIT ))
214
- list (APPEND CMAKE_MESSAGE_CONTEXT "audit" )
215
- _mongo_compute_default (tmp "${dflt_AUDIT} " )
216
- message (DEBUG "Detected MONGODB_BUILD_AUDIT: Default of ${setting_NAME} is “${tmp} ”" )
217
- set ("${outvar} " "${tmp} " PARENT_SCOPE )
218
- return ()
219
204
endif ()
220
205
221
206
# Parse everything else:
@@ -249,7 +234,7 @@ Define a new boolean build setting::
249
234
250
235
mongo_bool_setting(
251
236
<name> <doc>
252
- [DEFAULT [[DEVEL|AUDIT ] [VALUE <value> | EVAL <code>]] ...]
237
+ [DEFAULT [[DEVEL] [VALUE <value> | EVAL <code>]] ...]
253
238
[VALIDATE [CODE <code>]]
254
239
[ADVANCED] [ALLOW_OTHER_VALUES]
255
240
)
0 commit comments