################################################################################
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
# runtime/src/iree/hal/utils/BUILD.bazel                                       #
#                                                                              #
# Use iree_cmake_extra_content from iree/build_defs.oss.bzl to add arbitrary   #
# CMake-only content.                                                          #
#                                                                              #
# To disable autogeneration for this file entirely, delete this header.        #
################################################################################

iree_add_all_subdirs()

iree_cc_library(
  NAME
    allocators
  HDRS
    "allocators.h"
  SRCS
    "allocators.c"
  DEPS
    ::caching_allocator
    ::debug_allocator
    iree::base
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    collective_batch
  HDRS
    "collective_batch.h"
  SRCS
    "collective_batch.c"
  DEPS
    ::resource_set
    iree::base
    iree::base::internal::arena
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    caching_allocator
  HDRS
    "caching_allocator.h"
  SRCS
    "caching_allocator.c"
  DEPS
    iree::base
    iree::base::internal::synchronization
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    debug_allocator
  HDRS
    "debug_allocator.h"
  SRCS
    "debug_allocator.c"
  DEPS
    iree::base
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    deferred_command_buffer
  HDRS
    "deferred_command_buffer.h"
  SRCS
    "deferred_command_buffer.c"
  DEPS
    ::resource_set
    iree::base
    iree::base::internal::arena
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    executable_debug_info
  HDRS
    "executable_debug_info.h"
  SRCS
    "executable_debug_info.c"
  DEPS
    iree::base
    iree::base::internal::flatcc::parsing
    iree::schemas::executable_debug_info_c_fbs
  PUBLIC
)

iree_cc_library(
  NAME
    file_cache
  HDRS
    "file_cache.h"
  SRCS
    "file_cache.c"
  DEPS
    iree::base
    iree::base::internal
    iree::base::internal::synchronization
    iree::hal
    iree::io::file_handle
  PUBLIC
)

iree_cc_library(
  NAME
    file_transfer
  HDRS
    "file_transfer.h"
  SRCS
    "file_transfer.c"
  DEPS
    iree::base
    iree::base::internal
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    files
  HDRS
    "fd_file.h"
    "file_registry.h"
    "memory_file.h"
  SRCS
    "fd_file.c"
    "file_registry.c"
    "memory_file.c"
  DEPS
    iree::base
    iree::hal
    iree::io::file_handle
  PUBLIC
)

iree_cc_library(
  NAME
    libmpi
  HDRS
    "libmpi.h"
    "libmpi_dynamic_symbols.h"
  SRCS
    "libmpi.c"
  DEPS
    iree::base
    iree::base::internal::dynamic_library
    iree::hal
  PUBLIC
)

iree_cc_test(
  NAME
    libmpi_test
  SRCS
    "libmpi_test.cc"
  DEPS
    ::libmpi
    iree::base
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    mpi_channel_provider
  HDRS
    "mpi_channel_provider.h"
  SRCS
    "mpi_channel_provider.c"
  DEPS
    ::libmpi
    iree::base
    iree::hal
  PUBLIC
)

iree_cc_library(
  NAME
    resource_set
  HDRS
    "resource_set.h"
  SRCS
    "resource_set.c"
  DEPS
    iree::base
    iree::base::internal
    iree::base::internal::arena
    iree::hal
  PUBLIC
)

iree_cc_binary_benchmark(
  NAME
    resource_set_benchmark
  SRCS
    "resource_set_benchmark.c"
  DEPS
    ::resource_set
    iree::base
    iree::base::internal::prng
    iree::hal
    iree::testing::benchmark
  TESTONLY
)

iree_cc_test(
  NAME
    resource_set_test
  SRCS
    "resource_set_test.cc"
  DEPS
    ::resource_set
    iree::base
    iree::hal
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    semaphore_base
  HDRS
    "semaphore_base.h"
  SRCS
    "semaphore_base.c"
  DEPS
    iree::base
    iree::base::internal::synchronization
    iree::hal
  PUBLIC
)

iree_cc_test(
  NAME
    semaphore_base_test
  SRCS
    "semaphore_base_test.cc"
  DEPS
    ::semaphore_base
    iree::base
    iree::base::internal::wait_handle
    iree::hal
    iree::testing::gtest
    iree::testing::gtest_main
)

iree_cc_library(
  NAME
    stream_tracing
  HDRS
    "stream_tracing.h"
  SRCS
    "stream_tracing.c"
  DEPS
    iree::base
    iree::base::internal::arena
    iree::base::internal::synchronization
    iree::hal
  PUBLIC
)

if(NOT IREE_ENABLE_THREADING)
  return()
endif()

iree_cc_library(
  NAME
    deferred_work_queue
  HDRS
    "deferred_work_queue.h"
  SRCS
    "deferred_work_queue.c"
  DEPS
    ::deferred_command_buffer
    ::resource_set
    ::semaphore_base
    iree::base
    iree::base::internal::arena
    iree::base::internal::synchronization
    iree::base::internal::threading
    iree::hal
  PUBLIC
)

### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
