# Copyright (C) 2020  CZ.NIC, z. s. p. o.
#
# This file is part of FRED.
#
# FRED is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# FRED is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with FRED.  If not, see <https://www.gnu.org/licenses/>.

find_package(Boost 1.53.0
    COMPONENTS
    program_options
    unit_test_framework
    REQUIRED)

add_executable(test-fred-logger-services
    main.cc
    setup/fixture/cfg.cc
    fixture.cc
    util.cc
    test_create_log_entry.cc
    test_close_log_entry.cc
    test_create_session.cc
    test_close_session.cc
    test_get_log_entry_types.cc
    test_get_services.cc
    test_get_results.cc
    test_get_object_reference_types.cc
    test_get_log_entry_info.cc
    test_list_log_entries.cc)

target_link_libraries(test-fred-logger-services PRIVATE
    Logger::library
    Boost::program_options
    Boost::unit_test_framework)

set_common_properties_on_targets(
    test-fred-logger-services)

install(TARGETS test-${PACKAGE} DESTINATION ${BINDIR})
add_custom_target(uninstall-tests COMMAND rm ${BINDIR}/test-${PACKAGE})
