@@ -49,17 +49,6 @@ cmake_minimum_required(VERSION 3.24)
4949
5050set (EXECUTORCH_ROOT ${CMAKE_CURRENT_SOURCE_DIR } )
5151
52- # Hexagon toolchain with release build complains about code in third party
53- # libraries.
54- if ("${CMAKE_SYSTEM_PROCESSOR } " MATCHES "Hexagon" AND "${CMAKE_BUILD_TYPE } "
55- STREQUAL "Release"
56- )
57- add_compile_options (
58- -Wno-error=format -Wno-error=implicit-int-conversion
59- -Wno-error=unused-variable -Wno-error=unused-function
60- )
61- endif ()
62-
6352# --- ExecuTorch Version ---
6453# Parse version from version.txt (single source of truth)
6554file (READ "${EXECUTORCH_ROOT} /version.txt" ET_VERSION_STRING )
@@ -90,6 +79,18 @@ project(executorch
9079 VERSION "${ET_VERSION_MAJOR} .${ET_VERSION_MINOR} .${ET_VERSION_PATCH} "
9180)
9281
82+ # Hexagon toolchain with release build complains about code in third party
83+ # libraries. Must come after project(), which runs the toolchain file that sets
84+ # CMAKE_SYSTEM_PROCESSOR, and before add_subdirectory(third-party).
85+ if ("${CMAKE_SYSTEM_PROCESSOR } " MATCHES "Hexagon" AND "${CMAKE_BUILD_TYPE } "
86+ STREQUAL "Release"
87+ )
88+ add_compile_options (
89+ -Wno-error=format -Wno-error=implicit-int-conversion
90+ -Wno-error=unused-variable -Wno-error=unused-function
91+ )
92+ endif ()
93+
9394message (
9495 STATUS
9596 "ExecuTorch version: ${ET_VERSION_MAJOR} .${ET_VERSION_MINOR} .${ET_VERSION_PATCH} "
@@ -1040,6 +1041,10 @@ if(EXECUTORCH_BUILD_PYBIND)
10401041 list (APPEND _dep_libs coremldelegate)
10411042 endif ()
10421043
1044+ if (EXECUTORCH_BUILD_VGF)
1045+ list (APPEND _dep_libs vgf_backend)
1046+ endif ()
1047+
10431048 if (EXECUTORCH_BUILD_MPS)
10441049 list (APPEND _dep_libs mpsdelegate)
10451050 endif ()
0 commit comments