#
# Copyright (c) 2019-2023 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
#
# Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#

lib unittests_entry_point
    :
        entry_point.cpp
        /boost/mysql/test//test_common
    :
        <link>static
    ;

cpp-pch unittests_pch
    :
        pch.hpp
        unittests_entry_point
    :
        <include>unit
    ;

run
        unittests_pch
        unittests_entry_point

        detail/channel/read_buffer.cpp
        detail/channel/message_parser.cpp
        detail/channel/message_reader.cpp
        detail/channel/message_writer_processor.cpp
        detail/channel/message_writer.cpp
        detail/auth/auth_calculator.cpp
        detail/auxiliar/static_string.cpp
        detail/auxiliar/rows_iterator.cpp
        detail/auxiliar/execution_request.cpp
        detail/auxiliar/datetime.cpp
        detail/auxiliar/row_impl.cpp
        detail/protocol/capabilities.cpp
        detail/protocol/null_bitmap_traits.cpp
        detail/protocol/deserialize_errc.cpp
        detail/protocol/serialization_test.cpp
        detail/protocol/deserialize_text_field.cpp
        detail/protocol/deserialize_binary_field.cpp
        detail/protocol/deserialize_row.cpp
        detail/protocol/deserialize_execution_messages.cpp
        detail/protocol/process_error_packet.cpp
        detail/execution_processor/execution_processor.cpp
        detail/execution_processor/execution_state_impl.cpp
        detail/execution_processor/static_execution_state_impl.cpp
        detail/execution_processor/results_impl.cpp
        detail/execution_processor/static_results_impl.cpp
        detail/execution_processor/concepts.cpp
        detail/network_algorithms/read_resultset_head.cpp
        detail/network_algorithms/start_execution_impl.cpp
        detail/network_algorithms/read_some_rows_dynamic.cpp
        detail/network_algorithms/read_some_rows_static.cpp
        detail/network_algorithms/read_some_rows_impl.cpp
        detail/network_algorithms/execute_impl.cpp
        detail/network_algorithms/high_level_execution.cpp
        detail/network_algorithms/close_statement.cpp
        detail/network_algorithms/ping.cpp
        detail/typing/meta_check_context.cpp
        detail/typing/pos_map.cpp
        detail/typing/readable_field_traits.cpp
        detail/typing/writable_field_traits.cpp
        detail/typing/row_traits.cpp
        detail/typing/get_type_index.cpp
        date.cpp
        datetime.cpp
        field_view.cpp
        field.cpp
        row_view.cpp
        row.cpp
        rows_view.cpp
        rows.cpp
        metadata.cpp
        client_errc.cpp
        common_server_errc.cpp
        mysql_server_errc.cpp
        mariadb_server_errc.cpp
        diagnostics.cpp
        statement.cpp
        execution_state.cpp
        static_execution_state.cpp
        results.cpp
        static_results.cpp
        resultset_view.cpp
        resultset.cpp
        connection.cpp
        throw_on_error.cpp
        misc.cpp
        multifn.cpp
        
    : requirements
        <toolset>msvc:<cxxflags>-FI"pch.hpp" # https://github.com/boostorg/boost/issues/711
    : target-name boost_mysql_unittests
    ;
