Skip to content

Commit 464bd9e

Browse files
authored
Make flat_tensor depend on generated schema (#8803)
When passing -GNinja to cmake to build with Ninja, I was frequently getting errors that executorch/extension/flat_tensor/serialize/flat_tensor_generated.h was not found. This seems to fix them?
1 parent 3be14ce commit 464bd9e

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,6 @@ endif()
724724

725725
if(EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR)
726726
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/flat_tensor)
727-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/flat_tensor/serialize)
728727
endif()
729728

730729
if(EXECUTORCH_BUILD_EXTENSION_LLM)

extension/flat_tensor/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ install(
3636
DESTINATION ${_common_include_directories}
3737
)
3838

39+
add_subdirectory(serialize)
40+
add_dependencies(extension_flat_tensor flat_tensor_schema)
41+
3942
if(BUILD_TESTING)
4043
add_subdirectory(test)
4144
endif()

0 commit comments

Comments
 (0)