# -*- mode: python -*- Import("env") env = env.Clone() env.Library( target=[ 'command_status', ], source=[ 'get_status_from_command_result.cpp', 'write_concern_error_detail.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/db/common', ], ) env.Library( target=[ 'protocol', ], source=[ 'message.cpp', 'op_msg.cpp', 'protocol.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/wire_version', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/db/bson/dotted_path_support', '$BUILD_DIR/mongo/db/server_options_core', ], ) env.Library( target=[ 'rpc', ], source=[ 'factory.cpp', ], LIBDEPS=[ 'command_reply', 'command_request', 'legacy_reply', 'legacy_request', 'metadata', 'object_check', 'protocol', '$BUILD_DIR/mongo/db/dbmessage', ], ) env.Library( target=[ 'object_check', ], source=[ 'object_check.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/server_parameters', ], ) env.Library( target=[ 'command_request', ], source=[ 'command_request.cpp', 'command_request_builder.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/read_preference', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/net/network', ], ) env.Library( target=[ 'legacy_request', ], source=[ 'legacy_request.cpp', 'legacy_request_builder.cpp', ], LIBDEPS=[ 'metadata', '$BUILD_DIR/mongo/db/dbmessage', '$BUILD_DIR/mongo/util/net/network', ], ) env.Library( target=[ 'command_reply', ], source=[ 'command_reply.cpp', 'command_reply_builder.cpp', 'reply_builder_interface.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/util/net/network', ], ) env.Library( target=[ 'legacy_reply', ], source=[ 'legacy_reply.cpp', 'legacy_reply_builder.cpp' ], LIBDEPS=[ '$BUILD_DIR/mongo/s/common_s', '$BUILD_DIR/mongo/util/net/network', 'command_reply', 'metadata', 'object_check', ], ) env.Library( target=[ 'metadata', ], source=[ 'metadata.cpp', 'metadata/config_server_metadata.cpp', 'metadata/egress_metadata_hook_list.cpp', 'metadata/logical_time_metadata.cpp', 'metadata/sharding_metadata.cpp', 'metadata/repl_set_metadata.cpp', 'metadata/oplog_query_metadata.cpp', 'metadata/tracking_metadata.cpp', ], LIBDEPS=[ 'client_metadata', 'audit_metadata', '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/client/read_preference', '$BUILD_DIR/mongo/db/logical_time_validator', '$BUILD_DIR/mongo/db/repl/optime', '$BUILD_DIR/mongo/db/signed_logical_time', ], ) env.Clone().InjectModule("enterprise").Library( target=[ 'audit_metadata', ], source=[ 'metadata/audit_metadata.cpp', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/bson/util/bson_extract', '$BUILD_DIR/mongo/db/auth/auth_rolename', '$BUILD_DIR/mongo/db/auth/user_name', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ], ) env.CppUnitTest( target=[ 'rpc_metadata_test', ], source=[ 'metadata_test.cpp', 'metadata/egress_metadata_hook_list_test.cpp', 'metadata/logical_time_metadata_test.cpp', 'metadata/sharding_metadata_test.cpp', 'metadata/tracking_metadata_test.cpp', ], LIBDEPS=[ 'metadata', ], ) env.CppUnitTest( target=[ 'rpc_test', ], source=[ 'command_reply_test.cpp', 'command_request_builder_test.cpp', 'command_request_test.cpp', 'get_status_from_command_result_test.cpp', 'legacy_request_test.cpp', 'object_check_test.cpp', 'op_msg_test.cpp', 'protocol_test.cpp', 'reply_builder_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/clientdriver_minimal', 'rpc', ], ) env.CppUnitTest( target='repl_set_metadata_test', source=[ 'metadata/repl_set_metadata_test.cpp', ], LIBDEPS=['metadata'] ) env.CppUnitTest( target='oplog_query_metadata_test', source=[ 'metadata/oplog_query_metadata_test.cpp', ], LIBDEPS=['metadata'] ) env.CppUnitTest( target='config_server_metadata_test', source=[ 'metadata/config_server_metadata_test.cpp', ], LIBDEPS=['metadata'] ) env.Library( target='client_metadata', source=[ 'metadata/client_metadata.cpp', 'metadata/client_metadata_ismaster.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/s/is_mongos', '$BUILD_DIR/mongo/transport/transport_layer_common', "$BUILD_DIR/mongo/util/concurrency/spin_lock", '$BUILD_DIR/mongo/util/net/network', "$BUILD_DIR/mongo/util/processinfo", ], ) env.CppUnitTest( target='client_metadata_test', source=[ 'metadata/client_metadata_test.cpp', ], LIBDEPS=[ 'client_metadata', ] ) env.CppIntegrationTest( target='op_msg_integration_test', source=[ 'op_msg_integration_test.cpp', ], LIBDEPS=[ 'protocol', '$BUILD_DIR/mongo/client/clientdriver_network', '$BUILD_DIR/mongo/transport/transport_layer_egress_init', '$BUILD_DIR/mongo/util/version_impl', ], )