gtest_dep = dependency('gtest', main: true, disabler: true, required: false)
gmock_dep = dependency('gmock', disabler: true, required: false)
if not gtest_dep.found() or not gmock_dep.found()
    gtest_proj = import('cmake').subproject('googletest', required: false)
    if gtest_proj.found()
        gtest_dep = declare_dependency(
            dependencies: [
                dependency('threads'),
                gtest_proj.dependency('gtest'),
                gtest_proj.dependency('gtest_main'),
            ],
        )
        gmock_dep = gtest_proj.dependency('gmock')
    else
        assert(
            not get_option('tests').enabled(),
            'Googletest is required if tests are enabled',
        )
    endif
endif

unit_tests = []

if get_option('tests').enabled()
    # generate the test executable
    foreach unit_test : unit_tests
        test(
            unit_test,
            executable(
                unit_test,
                unit_test + '.cpp',
                '../src/host_error_monitor.cpp',
                cpp_args: '-DUNIT_TEST',
                include_directories: incs,
                dependencies: deps
                + [
                    gtest_dep,
                    gmock_dep,
                ],
            ),
        )
    endforeach
endif