blob: 14c6567f59a14d2c6802a12d0713584600c5d934 [file] [log] [blame]
################################################################################
# Autogenerated by build_tools/bazel_to_cmake/bazel_to_cmake.py from #
# compiler/bindings/c/BUILD #
# #
# 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
headers
HDRS
"iree/compiler/api_support.h"
"iree/compiler/embedding_api.h"
"iree/compiler/loader.h"
"iree/compiler/tool_entry_points_api.h"
INCLUDES
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/.>"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/.>"
PUBLIC
)
iree_cc_library(
NAME
loader
SRCS
"iree/compiler/loader/handle_symbols.inc"
"iree/compiler/loader/loader.cpp"
DEPS
${CMAKE_DL_LIBS}
::headers
PUBLIC
)
### BAZEL_TO_CMAKE_PRESERVES_ALL_CONTENT_BELOW_THIS_LINE ###
# TODO: Make this test work with Bazel once that is more solid.
if(IREE_HAVE_DYNAMIC_LIBRARY_LOADING)
# Dynamic library loading enabled.
if(IREE_BUILD_COMPILER AND IREE_BUILD_TESTS)
iree_cc_test(
NAME
loader_test
SRCS
"iree/compiler/loader/loader_test.c"
ARGS
"$<TARGET_FILE:iree::compiler::API::SharedImpl>"
DEPS
::loader
)
# Must be a build dependency but not a library dep (we depend on it at
# runtime).
# TODO: Find a better way to do this.
add_dependencies(
iree_compiler_bindings_c_loader_test
iree::compiler::API::SharedImpl
)
endif()
else()
# Dynamic library loading not available. Exclude loader from all.
message(STATUS "Disabling compiler loader (platform does not support library loading)")
iree_cc_library_exclude_from_all(loader TRUE)
endif()