# -*- mode: python -*- Import('env') env = env.Clone() env.SConscript( dirs=[ 'process_interface', ], exports=[ 'env', ], ) env.Library( target='aggregation', source=[ 'aggregation.cpp', ], LIBDEPS=[ 'aggregation_request', 'expression_context', 'pipeline', ] ) env.Library( target='field_path', source=[ 'field_path.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', ] ) env.Library( target='aggregation_request', source=[ 'aggregation_request.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/namespace_string', '$BUILD_DIR/mongo/db/query/command_request_response', '$BUILD_DIR/mongo/db/query/explain_options', '$BUILD_DIR/mongo/db/query/query_request', '$BUILD_DIR/mongo/db/repl/read_concern_args', '$BUILD_DIR/mongo/db/storage/storage_options', '$BUILD_DIR/mongo/db/write_concern_options', 'document_sources_idl', ] ) env.Library( target='expression_context', source=[ 'expression.cpp', 'expression_context.cpp', 'expression_function.cpp', 'expression_js_emit.cpp', 'expression_trigonometric.cpp', 'javascript_execution.cpp', 'make_js_function.cpp', 'variables.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface', '$BUILD_DIR/mongo/db/query/datetime/date_time_support', '$BUILD_DIR/mongo/db/query/query_knobs', '$BUILD_DIR/mongo/db/server_options_core', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/scripting/scripting', '$BUILD_DIR/mongo/scripting/scripting_common', '$BUILD_DIR/mongo/util/intrusive_counter', '$BUILD_DIR/mongo/util/regex_util', '$BUILD_DIR/mongo/util/summation', 'aggregation_request', 'dependencies', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/vector_clock', '$BUILD_DIR/mongo/db/mongohasher', ], ) env.Library( target='dependencies', source=[ 'dependencies.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', 'field_path', ] ) env.Library( target='accumulator', source=[ 'accumulation_statement.cpp', 'accumulator_add_to_set.cpp', 'accumulator_avg.cpp', 'accumulator_first.cpp', 'accumulator_js_reduce.cpp', 'accumulator_last.cpp', 'accumulator_merge_objects.cpp', 'accumulator_min_max.cpp', 'accumulator_push.cpp', 'accumulator_std_dev.cpp', 'accumulator_sum.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/query/query_knobs', '$BUILD_DIR/mongo/scripting/scripting_common', '$BUILD_DIR/mongo/util/summation', 'expression_context', 'field_path', ] ) env.Library( target='granularity_rounder', source=[ 'granularity_rounder.cpp', 'granularity_rounder_powers_of_two.cpp', 'granularity_rounder_preferred_numbers.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/exec/document_value/document_value', 'expression_context', 'field_path', ] ) env.Library( target='document_source_mock', source=[ 'document_source_mock.cpp', 'process_interface/stub_lookup_single_document_process_interface.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/query/query_test_service_context', 'pipeline', ] ) env.Library( target='sharded_agg_helpers', source=[ 'sharded_agg_helpers.cpp', ], LIBDEPS=[ 'aggregation', '$BUILD_DIR/mongo/s/async_requests_sender', '$BUILD_DIR/mongo/s/commands/shared_cluster_commands', '$BUILD_DIR/mongo/s/query/cluster_query', ], ) env.Library( target='lite_parsed_document_source', source=[ 'lite_parsed_document_source.cpp', 'lite_parsed_pipeline.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/db/stats/counters', 'aggregation_request', ] ) env.Library( target="document_path_support", source=[ 'document_path_support.cpp', ], LIBDEPS=[ "$BUILD_DIR/mongo/db/exec/document_value/document_value", ], ) pipelineEnv = env.Clone() pipelineEnv.InjectThirdParty(libraries=['snappy']) pipelineEnv.Library( target='pipeline', source=[ 'document_source.cpp', 'document_source_add_fields.cpp', 'document_source_bucket.cpp', 'document_source_bucket_auto.cpp', 'document_source_change_stream.cpp', 'document_source_change_stream_close_cursor.cpp', 'document_source_change_stream_transform.cpp', 'document_source_check_invalidate.cpp', 'document_source_check_resume_token.cpp', 'document_source_coll_stats.cpp', 'document_source_count.cpp', 'document_source_current_op.cpp', 'document_source_exchange.cpp', 'document_source_facet.cpp', 'document_source_geo_near.cpp', 'document_source_graph_lookup.cpp', 'document_source_group.cpp', 'document_source_index_stats.cpp', 'document_source_internal_inhibit_optimization.cpp', 'document_source_internal_shard_filter.cpp', 'document_source_internal_split_pipeline.cpp', 'document_source_limit.cpp', 'document_source_list_cached_and_active_users.cpp', 'document_source_list_local_sessions.cpp', 'document_source_list_sessions.cpp', 'document_source_lookup.cpp', 'document_source_lookup_change_post_image.cpp', 'document_source_lookup_change_pre_image.cpp', 'document_source_match.cpp', 'document_source_merge.cpp', 'document_source_out.cpp', 'document_source_plan_cache_stats.cpp', 'document_source_project.cpp', 'document_source_queue.cpp', 'document_source_redact.cpp', 'document_source_replace_root.cpp', 'document_source_sample.cpp', 'document_source_sample_from_random_cursor.cpp', 'document_source_sequential_document_cache.cpp', 'document_source_single_document_transformation.cpp', 'document_source_skip.cpp', 'document_source_sort.cpp', 'document_source_sort_by_count.cpp', 'document_source_tee_consumer.cpp', 'document_source_union_with.cpp', 'document_source_unwind.cpp', 'pipeline.cpp', 'semantic_analysis.cpp', 'sequential_document_cache.cpp', 'tee_buffer.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/client/clientdriver_minimal', '$BUILD_DIR/mongo/db/auth/auth', '$BUILD_DIR/mongo/db/bson/dotted_path_support', '$BUILD_DIR/mongo/db/curop', '$BUILD_DIR/mongo/db/curop_failpoint_helpers', '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/exec/projection_executor', '$BUILD_DIR/mongo/db/exec/scoped_timer', '$BUILD_DIR/mongo/db/exec/sort_executor', '$BUILD_DIR/mongo/db/generic_cursor', '$BUILD_DIR/mongo/db/index/key_generator', '$BUILD_DIR/mongo/db/logical_session_cache', '$BUILD_DIR/mongo/db/logical_session_id_helpers', '$BUILD_DIR/mongo/db/matcher/expressions', '$BUILD_DIR/mongo/db/pipeline/lite_parsed_document_source', '$BUILD_DIR/mongo/db/query/collation/collator_factory_interface', '$BUILD_DIR/mongo/db/query/collation/collator_interface', '$BUILD_DIR/mongo/db/query/sort_pattern', '$BUILD_DIR/mongo/db/repl/oplog_entry', '$BUILD_DIR/mongo/db/repl/read_concern_args', '$BUILD_DIR/mongo/db/repl/repl_coordinator_interface', '$BUILD_DIR/mongo/db/repl/speculative_majority_read_info', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/sessions_collection', '$BUILD_DIR/mongo/db/storage/encryption_hooks', '$BUILD_DIR/mongo/db/storage/storage_options', '$BUILD_DIR/mongo/db/views/resolved_view', '$BUILD_DIR/mongo/s/is_mongos', '$BUILD_DIR/third_party/shim_snappy', 'accumulator', 'dependencies', 'document_path_support', 'document_sources_idl', 'expression_context', 'granularity_rounder', ], LIBDEPS_PRIVATE=[ '$BUILD_DIR/mongo/db/commands/test_commands_enabled', '$BUILD_DIR/mongo/rpc/command_status', ] ) env.Library( target='runtime_constants_idl', source=[ env.Idlc('runtime_constants.idl')[0] ], LIBDEPS=[ '$BUILD_DIR/mongo/idl/idl_parser', ], ) env.Library( target='document_sources_idl', source=[ env.Idlc('document_source_change_stream.idl')[0], env.Idlc('document_source_list_sessions.idl')[0], env.Idlc('document_source_merge.idl')[0], env.Idlc('document_source_merge_modes.idl')[0], env.Idlc('document_source_replace_root.idl')[0], env.Idlc('document_source_union_with.idl')[0], env.Idlc('exchange_spec.idl')[0], env.Idlc('value.idl')[0], 'document_source_merge_spec.cpp', 'resume_token.cpp' ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/storage/key_string', '$BUILD_DIR/mongo/idl/idl_parser', '$BUILD_DIR/mongo/s/common_s', 'runtime_constants_idl', ], ) env.CppUnitTest( target='db_pipeline_test', source=[ 'accumulator_js_test.cpp', 'accumulator_test.cpp', 'aggregation_request_test.cpp', 'dependencies_test.cpp', 'dispatch_shard_pipeline_test.cpp', 'document_path_support_test.cpp', 'document_source_add_fields_test.cpp', 'document_source_bucket_auto_test.cpp', 'document_source_bucket_test.cpp', 'document_source_change_stream_test.cpp', 'document_source_check_resume_token_test.cpp', 'document_source_count_test.cpp', 'document_source_current_op_test.cpp', 'document_source_exchange_test.cpp', 'document_source_facet_test.cpp', 'document_source_geo_near_test.cpp', 'document_source_graph_lookup_test.cpp', 'document_source_group_test.cpp', 'document_source_internal_shard_filter_test.cpp', 'document_source_internal_split_pipeline_test.cpp', 'document_source_limit_test.cpp', 'document_source_lookup_change_post_image_test.cpp', 'document_source_lookup_test.cpp', 'document_source_match_test.cpp', 'document_source_merge_cursors_test.cpp', 'document_source_merge_test.cpp', 'document_source_mock_test.cpp', 'document_source_out_test.cpp', 'document_source_plan_cache_stats_test.cpp', 'document_source_project_test.cpp', 'document_source_redact_test.cpp', 'document_source_replace_root_test.cpp', 'document_source_sample_test.cpp', 'document_source_sequential_document_cache_test.cpp', 'document_source_skip_test.cpp', 'document_source_sort_by_count_test.cpp', 'document_source_sort_test.cpp', 'document_source_union_with_test.cpp', 'document_source_unwind_test.cpp', 'expression_and_test.cpp', 'expression_compare_test.cpp', 'expression_context_test.cpp', 'expression_convert_test.cpp', 'expression_date_test.cpp', 'expression_field_path_test.cpp', 'expression_find_internal_test.cpp', 'expression_javascript_test.cpp', 'expression_nary_test.cpp', 'expression_object_test.cpp', 'expression_or_test.cpp', 'expression_replace_test.cpp', 'expression_test.cpp', 'expression_trigonometric_test.cpp', 'expression_trim_test.cpp', 'expression_walker_test.cpp', 'field_path_test.cpp', 'granularity_rounder_powers_of_two_test.cpp', 'granularity_rounder_preferred_numbers_test.cpp', 'lookup_set_cache_test.cpp', 'pipeline_metadata_tree_test.cpp', 'pipeline_test.cpp', 'resume_token_test.cpp', 'semantic_analysis_test.cpp', 'sequential_document_cache_test.cpp', 'sharded_union_test.cpp', 'tee_buffer_test.cpp', ], LIBDEPS=[ '$BUILD_DIR/mongo/base', '$BUILD_DIR/mongo/db/auth/authmocks', '$BUILD_DIR/mongo/db/cst/cst', '$BUILD_DIR/mongo/db/exec/document_value/document_value', '$BUILD_DIR/mongo/db/exec/document_value/document_value_test_util', '$BUILD_DIR/mongo/db/mongohasher', '$BUILD_DIR/mongo/db/query/collation/collator_interface_mock', '$BUILD_DIR/mongo/db/query/query_test_service_context', '$BUILD_DIR/mongo/db/repl/oplog_entry', '$BUILD_DIR/mongo/db/repl/replmocks', '$BUILD_DIR/mongo/db/service_context', '$BUILD_DIR/mongo/db/service_context_d', '$BUILD_DIR/mongo/db/service_context_d_test_fixture', '$BUILD_DIR/mongo/db/service_context_test_fixture', '$BUILD_DIR/mongo/executor/thread_pool_task_executor_test_fixture', '$BUILD_DIR/mongo/s/is_mongos', '$BUILD_DIR/mongo/s/query/router_exec_stage', '$BUILD_DIR/mongo/s/sharding_router_test_fixture', '$BUILD_DIR/mongo/util/clock_source_mock', 'accumulator', 'aggregation_request', 'document_source_mock', 'document_sources_idl', 'expression_context', 'field_path', 'granularity_rounder', 'pipeline', 'process_interface/mongod_process_interfaces', 'process_interface/mongos_process_interface', 'process_interface/shardsvr_process_interface', 'sharded_agg_helpers', ] )