if not TESTS_OPT.enabled()
    subdir_done()
endif

kea_dns_tests = executable(
    'kea-dns-tests',
    'dns_exceptions_unittest.cc',
    'edns_unittest.cc',
    'labelsequence_unittest.cc',
    'master_lexer_inputsource_unittest.cc',
    'master_lexer_state_unittest.cc',
    'master_lexer_token_unittest.cc',
    'master_lexer_unittest.cc',
    'master_loader_callbacks_test.cc',
    'master_loader_unittest.cc',
    'messagerenderer_unittest.cc',
    'message_unittest.cc',
    'name_unittest.cc',
    'opcode_unittest.cc',
    'question_unittest.cc',
    'rcode_unittest.cc',
    'rdata_char_string_data_unittest.cc',
    'rdata_char_string_unittest.cc',
    'rdata_dhcid_unittest.cc',
    'rdata_in_aaaa_unittest.cc',
    'rdata_in_a_unittest.cc',
    'rdata_ns_unittest.cc',
    'rdata_opt_unittest.cc',
    'rdata_ptr_unittest.cc',
    'rdata_rrsig_unittest.cc',
    'rdata_soa_unittest.cc',
    'rdata_tkey_unittest.cc',
    'rdata_tsig_unittest.cc',
    'rdata_txt_like_unittest.cc',
    'rdata_unittest.cc',
    'rrclass_unittest.cc',
    'rrparamregistry_unittest.cc',
    'rrset_unittest.cc',
    'rrttl_unittest.cc',
    'rrtype_unittest.cc',
    'run_unittests.cc',
    'serial_unittest.cc',
    'time_utils_unittest.cc',
    'tsigerror_unittest.cc',
    'tsigkey_unittest.cc',
    'tsigrecord_unittest.cc',
    'tsig_unittest.cc',
    'unittest_util.cc',
    cpp_args: [
        f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/dns/tests/testdata"',
        f'-DTEST_DATA_SRCDIR="@TOP_SOURCE_DIR@/src/lib/dns/tests/testdata"',
    ],
    dependencies: [GTEST_DEP],
    include_directories: [include_directories('.')] + INCLUDES,
    link_with: [kea_util_unittests_lib] + LIBS_BUILT_SO_FAR,
)
test('kea-dns-tests', kea_dns_tests, protocol: 'gtest')
