summaryrefslogtreecommitdiff
path: root/src/mongo/util/options_parser/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/options_parser/SConscript')
-rw-r--r--src/mongo/util/options_parser/SConscript32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mongo/util/options_parser/SConscript b/src/mongo/util/options_parser/SConscript
new file mode 100644
index 00000000000..7e22ee43b62
--- /dev/null
+++ b/src/mongo/util/options_parser/SConscript
@@ -0,0 +1,32 @@
+# -*- mode: python -*-
+
+Import("env")
+
+env.Library('options_parser', ['environment.cpp',
+ 'value.cpp',
+ 'constraints.cpp',
+ 'option_section.cpp',
+ 'option_description.cpp',
+ 'options_parser.cpp',
+ 'startup_option_init.cpp',
+ 'startup_options.cpp',
+ ],
+ LIBDEPS=['$BUILD_DIR/mongo/bson',
+ '$BUILD_DIR/third_party/shim_yaml',
+ '$BUILD_DIR/third_party/shim_pcrecpp'
+ ])
+
+# This library contains the initializers to run option parsing. This is separated into its own
+# library because some code that is shared between many different binaries needs to link against the
+# options_parser library, but not all these binaries need to actually run the option parsing.
+# Linking against this library will cause the option parsing initializer to actually be run.
+env.Library('options_parser_init', ['options_parser_init.cpp'],
+ LIBDEPS=['options_parser'])
+
+env.CppUnitTest('options_parser_test',
+ 'options_parser_test.cpp',
+ LIBDEPS=['options_parser', '$BUILD_DIR/mongo/unittest/unittest'])
+
+env.CppUnitTest('environment_test',
+ 'environment_test.cpp',
+ LIBDEPS=['options_parser', '$BUILD_DIR/mongo/unittest/unittest'])