Skip to content

CMake build fails with test errors when tests are not enabled #13338

@GregoryComer

Description

@GregoryComer

When building a CMake project with ET as a dependency as follows, the build fails with a test-related error. Tests should not be built. We should investigate and resolve the issue.

include(FetchContent)

FetchContent_Declare(
    executorch
    GIT_REPOSITORY  https://github.com/pytorch/executorch.git
    GIT_TAG         v0.6.0
    GIT_SHALLOW     TRUE
    GIT_PROGRESS    TRUE
    SOURCE_DIR      ${CMAKE_CURRENT_BINARY_DIR}/_deps/executorch # https://github.com/pytorch/executorch/issues/6475
)

set(EXECUTORCH_BUILD_XNNPACK ON)
set(EXECUTORCH_BUILD_VULKAN ON)
set(EXECUTORCH_BUILD_KERNELS_OPTIMIZED ON)
set(EXECUTORCH_BUILD_KERNELS_QUANTIZED ON)
set(EXECUTORCH_BUILD_EXTENSION_MODULE ON)
set(EXECUTORCH_BUILD_EXTENSION_TENSOR ON)
set(EXECUTORCH_BUILD_EXECUTOR_RUNNER OFF)
set(EXECUTORCH_LOG_LEVEL "info")

FetchContent_MakeAvailable(executorch)

See Discord thread: https://discordapp.com/channels/1334270993966825602/1404274480540418148/1404274480540418148.

cc @larryliu0820 @jathu

Metadata

Metadata

Assignees

Labels

module: build/installIssues related to the cmake and buck2 builds, and to installing ExecuTorch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions