################################################################################
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
# runtime/src/iree/hal/drivers/amdgpu/device/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()

add_custom_command(OUTPUT bitcode_srcs.stamp
    COMMAND ${CMAKE_COMMAND} -E touch bitcode_srcs.stamp
  DEPENDS
    "blit.c"
    "dispatch.c"
    "timestamp.c"
)

add_custom_target(bitcode_srcs
    DEPENDS bitcode_srcs.stamp
)

add_custom_command(OUTPUT bitcode_hdrs.stamp
    COMMAND ${CMAKE_COMMAND} -E touch bitcode_hdrs.stamp
  DEPENDS
    "blit.h"
    "dispatch.h"
    "kernel_tables.h"
    "kernels.h"
    "support/common.h"
    "support/kernel.h"
    "support/queue.h"
    "support/signal.h"
    "timestamp.h"
)

add_custom_target(bitcode_hdrs
    DEPENDS bitcode_hdrs.stamp
)

iree_cc_library(
  NAME
    headers
  HDRS
    "blit.h"
    "dispatch.h"
    "kernel_tables.h"
    "kernels.h"
    "support/common.h"
    "support/kernel.h"
    "support/queue.h"
    "support/signal.h"
    "timestamp.h"
  DEPS
    iree::base
    iree::base::internal
    iree::base::threading::thread
    iree::hal::drivers::amdgpu::abi
  PUBLIC
)

iree_cc_library(
  NAME
    blit
  SRCS
    "blit.c"
  DEPS
    ::headers
  PUBLIC
)

iree_cc_library(
  NAME
    dispatch
  SRCS
    "dispatch.c"
  DEPS
    ::headers
  PUBLIC
)

iree_cc_library(
  NAME
    timestamp
  SRCS
    "timestamp.c"
  DEPS
    ::dispatch
    ::headers
  PUBLIC
)

iree_cc_test(
  NAME
    blit_test
  SRCS
    "blit_test.cc"
  DEPS
    ::blit
    ::headers
    iree::testing::gtest
    iree::testing::gtest_main
  LABELS
    "driver=amdgpu"
    "nodocker"
  GROUP
    "iree-hal-drivers-amdgpu-tests"
)

iree_cc_test(
  NAME
    dispatch_test
  SRCS
    "dispatch_test.cc"
  DEPS
    ::dispatch
    ::headers
    iree::testing::gtest
    iree::testing::gtest_main
  LABELS
    "driver=amdgpu"
    "nodocker"
  GROUP
    "iree-hal-drivers-amdgpu-tests"
)

iree_cc_test(
  NAME
    timestamp_test
  SRCS
    "timestamp_test.cc"
  DEPS
    ::headers
    ::timestamp
    iree::hal::drivers::amdgpu::abi
    iree::testing::gtest
    iree::testing::gtest_main
  LABELS
    "driver=amdgpu"
    "nodocker"
  GROUP
    "iree-hal-drivers-amdgpu-tests"
)

### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
