################################################################################
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from           #
# runtime/src/iree/async/platform/posix/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()

if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
set(_posix_platform_deps "")
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
  list(APPEND _posix_platform_deps iree::async::platform::linux::signal)
elseif(CMAKE_SYSTEM_NAME STREQUAL "Android")
  list(APPEND _posix_platform_deps iree::async::platform::linux::signal)
endif()
iree_cc_library(
  NAME
    posix
  HDRS
    "api.h"
    "compat.h"
    "event_set.h"
    "fd_map.h"
    "fence.h"
    "poll_set.h"
    "proactor.h"
    "relay.h"
    "signal.h"
    "socket.h"
    "wake.h"
    "worker.h"
  SRCS
    "event_set_epoll.c"
    "event_set_kqueue.c"
    "event_set_poll.c"
    "fd_map.c"
    "fence.c"
    "poll_set.c"
    "proactor.c"
    "relay.c"
    "signal.c"
    "socket.c"
    "wake.c"
    "worker.c"
  DEPS
    ::timer_list
    iree::async
    iree::async::util::completion_pool
    iree::async::util::message_pool
    iree::async::util::ready_pool
    iree::async::util::sequence_emulation
    iree::async::util::signal
    iree::base
    iree::base::internal
    iree::base::internal::atomic_slist
    iree::base::threading
    iree::base::threading::thread
    ${_posix_platform_deps}
  PUBLIC
)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
iree_cc_library(
  NAME
    timer_list
  HDRS
    "timer_list.h"
  SRCS
    "timer_list.c"
  DEPS
    iree::async
    iree::base
  PUBLIC
)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Android" OR CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
iree_cc_test(
  NAME
    timer_list_test
  SRCS
    "timer_list_test.cc"
  DEPS
    ::timer_list
    iree::testing::gtest
    iree::testing::gtest_main
)
endif()

### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
