# -*- mode: python -*- Import("env") Import("free_monitoring") env = env.Clone() fmEnv = env.Clone() fmEnv.InjectThirdParty(libraries=['snappy']) fmEnv.Library( target='free_mon', source=[ 'free_mon_processor.cpp', 'free_mon_queue.cpp', 'free_mon_op_observer.cpp', 'free_mon_storage.cpp', 'free_mon_controller.cpp', 'free_mon_protocol.idl', 'free_mon_commands.idl', 'free_mon_storage.idl', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/concurrency/lock_manager', '$BUILD_DIR/mongo/db/dbhelpers', '$BUILD_DIR/mongo/db/ftdc/ftdc', '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/third_party/shim_snappy', ], ) if free_monitoring == "on": fmEnv.Library( target='free_mon_mongod', source=[ 'free_mon_commands.cpp', 'free_mon_mongod.cpp', 'free_mon_mongod.idl', 'free_mon_options.cpp', 'free_mon_options.idl', 'free_mon_status.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/commands/server_status', '$BUILD_DIR/mongo/db/ftdc/ftdc_server', '$BUILD_DIR/mongo/util/options_parser/options_parser', 'free_mon', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/client/clientdriver_network', '$BUILD_DIR/mongo/util/concurrency/thread_pool', '$BUILD_DIR/mongo/util/net/http_client', ], ) else: fmEnv.Library( target='free_mon_mongod', source=[ 'free_mon_commands_stub.cpp', 'free_mon_stub.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/auth', '$BUILD_DIR/mongo/db/auth/authprivilege', '$BUILD_DIR/mongo/db/commands', 'free_mon', ], ) fmEnv.CppUnitTest( target='db_free_mon_test', source=[ 'free_mon_controller_test.cpp', 'free_mon_queue_test.cpp', 'free_mon_storage_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/auth/authmocks', '$BUILD_DIR/mongo/db/repl/replmocks', '$BUILD_DIR/mongo/db/repl/storage_interface_impl', '$BUILD_DIR/mongo/db/service_context_d_test_fixture', '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', '$BUILD_DIR/mongo/util/clock_source_mock', 'free_mon', ], )