Skip to content

Tests use executorch_core #10764

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions examples/selective_build/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ find_package(
gflags REQUIRED PATHS ${CMAKE_CURRENT_BINARY_DIR}/../../third-party
)

target_include_directories(executorch INTERFACE ${_common_include_directories})
target_include_directories(executorch_core INTERFACE ${_common_include_directories})

# ------------------------------ OPTIONS BEGIN -------------------------------

Expand Down Expand Up @@ -91,7 +91,7 @@ if(EXECUTORCH_SELECT_OPS_YAML)
# custom_kernels: C++ kernel implementations of custom ops
#
add_library(custom_kernels ${kernel_sources})
target_link_libraries(custom_kernels PRIVATE executorch)
target_link_libraries(custom_kernels PRIVATE executorch_core)
target_compile_options(custom_kernels PUBLIC ${_common_compile_options})

list(APPEND _kernel_lib custom_kernels)
Expand All @@ -117,7 +117,7 @@ generate_bindings_for_kernels(
)

gen_operators_lib(
LIB_NAME "select_build_lib" KERNEL_LIBS ${_kernel_lib} DEPS executorch
LIB_NAME "select_build_lib" KERNEL_LIBS ${_kernel_lib} DEPS executorch_core
)

list(TRANSFORM _executor_runner__srcs PREPEND "${EXECUTORCH_ROOT}/")
Expand All @@ -131,10 +131,9 @@ if(CMAKE_BUILD_TYPE EQUAL "Release")
target_link_options(selective_build_test PRIVATE "LINKER:--gc-sections")
endif()
target_link_libraries(
selective_build_test PRIVATE executorch gflags select_build_lib
selective_build_test PRIVATE executorch_core gflags select_build_lib
)
target_link_options_shared_lib(select_build_lib)
target_link_options_shared_lib(executorch)
target_compile_options(selective_build_test PUBLIC ${_common_compile_options})

# Print all summary
Expand Down
6 changes: 3 additions & 3 deletions runtime/kernel/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ include(${EXECUTORCH_ROOT}/tools/cmake/Test.cmake)

add_executable(operator_registry_test operator_registry_test.cpp)
target_link_libraries(
operator_registry_test GTest::gtest GTest::gtest_main GTest::gmock executorch
operator_registry_test GTest::gtest GTest::gtest_main GTest::gmock executorch_core
)
target_include_directories(operator_registry_test PRIVATE ${EXECUTORCH_ROOT}/..)
add_test(operator_registry_test operator_registry_test)

add_executable(kernel_runtime_context_test kernel_runtime_context_test.cpp)
target_link_libraries(
kernel_runtime_context_test GTest::gtest GTest::gtest_main GTest::gmock
executorch
executorch_core
)
target_include_directories(
kernel_runtime_context_test PRIVATE ${EXECUTORCH_ROOT}/..
Expand All @@ -47,7 +47,7 @@ add_executable(
)
target_link_libraries(
operator_registry_max_kernel_num_test GTest::gtest GTest::gtest_main
GTest::gmock executorch
GTest::gmock executorch_core
)
target_compile_definitions(
operator_registry_max_kernel_num_test PRIVATE "-DMAX_KERNEL_NUM=1"
Expand Down
Loading