diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-03-24 23:02:41 -0400 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-03-25 10:04:14 -0400 |
commit | 91de99a737519c50047845cfd0c810b6d9329cc6 (patch) | |
tree | 4be3e13db087931257d29f9dea108323bc150fd7 /SConstruct | |
parent | 7b46b1c860c26013be06ddbcd0d16ab05d598401 (diff) | |
download | mongo-91de99a737519c50047845cfd0c810b6d9329cc6.tar.gz |
SERVER-17730 Allow selection of non-posix shlex mode for Variables
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct index a45d23675e0..ffb76f42e2b 100644 --- a/SConstruct +++ b/SConstruct @@ -333,9 +333,19 @@ add_option('cache-dir', "Specify the directory to use for caching objects if --cache is in use", 1, False, default="$BUILD_ROOT/scons/cache") +variable_parse_mode_choices=['auto', 'posix', 'other'] +add_option('variable-parse-mode', + "Select which parsing mode is used to interpret command line variables", + 1, False, + type='choice', default=variable_parse_mode_choices[0], + choices=variable_parse_mode_choices) + # Setup the command-line variables def variable_shlex_converter(val): - return shlex.split(val) + parse_mode = get_option('variable-parse-mode') + if parse_mode == 'auto': + parse_mode = 'other' if windows else 'posix' + return shlex.split(val, posix=(parse_mode == 'posix')) def variable_arch_converter(val): arches = { |