@@ -276,9 +276,72 @@ define_overridable_option(
276276 "Enable weights cache to cache and manage all packed weights"
277277 BOOL OFF
278278)
279+ define_overridable_option(
280+ EXECUTORCH_USE_CPP_CODE_COVERAGE
281+ "Build with code coverage enabled"
282+ BOOL OFF
283+ )
279284
280- # MARK: - Validations
285+ # ------------------------------------------------------------------------------
286+ # Validations!
287+ #
281288# At this point all the options should be configured with their final value.
289+ # ------------------------------------------------------------------------------
290+
291+ check_required_options_on(
292+ IF_ON
293+ EXECUTORCH_ENABLE_EVENT_TRACER
294+ REQUIRES
295+ EXECUTORCH_BUILD_DEVTOOLS
296+ )
297+
298+ check_required_options_on(
299+ IF_ON
300+ EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR
301+ REQUIRES
302+ EXECUTORCH_BUILD_EXTENSION_DATA_LOADER
303+ )
304+
305+ check_required_options_on(
306+ IF_ON
307+ EXECUTORCH_BUILD_EXTENSION_MODULE
308+ REQUIRES
309+ EXECUTORCH_BUILD_EXTENSION_DATA_LOADER
310+ EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR
311+ )
312+
313+ check_required_options_on(
314+ IF_ON
315+ EXECUTORCH_BUILD_KERNELS_CUSTOM
316+ REQUIRES
317+ EXECUTORCH_BUILD_KERNELS_OPTIMIZED
318+ )
319+
320+ check_required_options_on(
321+ IF_ON
322+ EXECUTORCH_BUILD_KERNELS_CUSTOM_AOT
323+ REQUIRES
324+ EXECUTORCH_BUILD_EXTENSION_TENSOR
325+ EXECUTORCH_BUILD_KERNELS_CUSTOM
326+ )
327+
328+ check_required_options_on(
329+ IF_ON
330+ EXECUTORCH_BUILD_EXTENSION_TRAINING
331+ REQUIRES
332+ EXECUTORCH_BUILD_EXTENSION_DATA_LOADER
333+ EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR
334+ EXECUTORCH_BUILD_EXTENSION_MODULE
335+ EXECUTORCH_BUILD_EXTENSION_TENSOR
336+ )
337+
338+ check_required_options_on(
339+ IF_ON
340+ EXECUTORCH_BUILD_TESTS
341+ REQUIRES
342+ EXECUTORCH_BUILD_EXTENSION_FLAT_TENSOR
343+ )
344+
282345
283346if (NOT EXISTS ${EXECUTORCH_PAL_DEFAULT_FILE_PATH} )
284347 message (FATAL_ERROR "PAL default implementation (EXECUTORCH_PAL_DEFAULT=${EXECUTORCH_PAL_DEFAULT} ) file not found: ${EXECUTORCH_PAL_DEFAULT_FILE_PATH} . Choices: posix, minimal, android" )
@@ -299,13 +362,6 @@ else()
299362endif ()
300363
301364
302- if (EXECUTORCH_ENABLE_EVENT_TRACER)
303- if (NOT EXECUTORCH_BUILD_DEVTOOLS)
304- message (FATAL_ERROR "Use of 'EXECUTORCH_ENABLE_EVENT_TRACER' requires 'EXECUTORCH_BUILD_DEVTOOLS' to be enabled." )
305- endif ()
306- endif ()
307-
308-
309365if (EXECUTORCH_BUILD_ARM_BAREMETAL)
310366 if (EXECUTORCH_BUILD_PTHREADPOOL)
311367 message (FATAL_ERROR "Cannot enable both EXECUTORCH_BUILD_PTHREADPOOL and EXECUTORCH_BUILD_ARM_BAREMETAL" )
0 commit comments