# -*- mode: python -*- Import("env") env.Library( target='query_planner', source=[ "canonical_query.cpp", "query_settings.cpp", "index_tag.cpp", "parsed_projection.cpp", "plan_cache.cpp", "plan_enumerator.cpp", "planner_access.cpp", "planner_analysis.cpp", "planner_ixselect.cpp", "query_knobs.cpp", "query_planner.cpp", "query_planner_common.cpp", "query_solution.cpp", ], LIBDEPS=[ "explain_common", "index_bounds", "lite_parsed_query", "$BUILD_DIR/mongo/bson", "$BUILD_DIR/mongo/expressions", "$BUILD_DIR/mongo/expressions_text", "$BUILD_DIR/mongo/index_names", "$BUILD_DIR/mongo/server_parameters", ], ) env.Library( target='query', source=[ "explain.cpp", "get_executor.cpp", "find.cpp", "plan_executor.cpp", "plan_ranker.cpp", "plan_yield_policy.cpp", "query_yield.cpp", "stage_builder.cpp", ], LIBDEPS=[ "query_planner", "query_planner_test_lib", "$BUILD_DIR/mongo/db/exec/exec" ], ) env.CppUnitTest( target="get_executor_test", source=[ "get_executor_test.cpp" ], LIBDEPS=[ "query", "$BUILD_DIR/mongo/serveronly", "$BUILD_DIR/mongo/coreserver", "$BUILD_DIR/mongo/coredb", "$BUILD_DIR/mongo/mocklib", "$BUILD_DIR/mongo/ntservice_mock", ], NO_CRUTCH = True, ) env.Library( target="index_bounds", source=[ "expression_index.cpp", "expression_index_knobs.cpp", "index_bounds.cpp", "index_bounds_builder.cpp", "interval.cpp", ], LIBDEPS=[ "$BUILD_DIR/mongo/bson", "$BUILD_DIR/mongo/expressions_geo", "$BUILD_DIR/mongo/index_names", "$BUILD_DIR/mongo/mongohasher", "$BUILD_DIR/mongo/server_parameters", ], ) env.Library( target="explain_common", source=[ "explain_common.cpp" ], LIBDEPS=[ "$BUILD_DIR/mongo/bson", ], ) env.Library( target="lite_parsed_query", source=[ "lite_parsed_query.cpp" ], LIBDEPS=[ "$BUILD_DIR/mongo/bson", ], ) env.Library( target="query_planner_test_lib", source=[ "query_planner_test_lib.cpp", ], LIBDEPS=[ "query_planner", ], ) env.CppUnitTest( target="canonical_query_test", source=[ "canonical_query_test.cpp" ], LIBDEPS=[ "query_planner", "$BUILD_DIR/mongo/expressions_text", ], ) env.CppUnitTest( target="index_bounds_test", source=[ "index_bounds_test.cpp" ], LIBDEPS=[ "index_bounds", ], ) env.CppUnitTest( target="index_bounds_builder_test", source=[ "index_bounds_builder_test.cpp" ], LIBDEPS=[ "index_bounds", ], ) env.CppUnitTest( target="interval_test", source=[ "interval_test.cpp" ], LIBDEPS=[ "index_bounds", ], ) env.CppUnitTest( target="lite_parsed_query_test", source=[ "lite_parsed_query_test.cpp" ], LIBDEPS=[ "lite_parsed_query", ], ) env.CppUnitTest( target="lru_key_value_test", source=[ "lru_key_value_test.cpp", ], LIBDEPS=[ ], ) env.CppUnitTest( target="parsed_projection_test", source=[ "parsed_projection_test.cpp" ], LIBDEPS=[ "query_planner", ], ) env.CppUnitTest( target="plan_cache_test", source=[ "plan_cache_test.cpp" ], LIBDEPS=[ "query_planner_test_lib", ], ) env.CppUnitTest( target="planner_analysis_test", source=[ "planner_analysis_test.cpp" ], LIBDEPS=[ "query_planner", ], ) env.CppUnitTest( target="planner_ixselect_test", source=[ "planner_ixselect_test.cpp" ], LIBDEPS=[ "query_planner", ], ) env.CppUnitTest( target="query_planner_test", source=[ "query_planner_test.cpp" ], LIBDEPS=[ "query_planner_test_lib", ], ) # $text pulls in a lot of stuff so we test it here. env.CppUnitTest( target="query_planner_text_test", source=[ "query_planner_text_test.cpp" ], LIBDEPS=[ "query", "query_planner_test_lib", "$BUILD_DIR/mongo/serveronly", "$BUILD_DIR/mongo/coreserver", "$BUILD_DIR/mongo/coredb", "$BUILD_DIR/mongo/mocklib", "$BUILD_DIR/mongo/ntservice_mock", ], NO_CRUTCH = True, )