Skip to content

Commit 807ac79

Browse files
committed
move EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
1 parent 5a8e1b2 commit 807ac79

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

CMakeLists.txt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,6 @@ set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON)
9191
# Instead please use `find_package(executorch REQUIRED)` in the example
9292
# directory and add a new executable in the example `CMakeLists.txt`.
9393

94-
# _default_release_disabled_options: default value for options that should be
95-
# disabled in Release mode by default. Users can still manually enable them,
96-
# though.
97-
if(CMAKE_BUILD_TYPE STREQUAL "Release")
98-
set(_default_release_disabled_options OFF)
99-
else()
100-
set(_default_release_disabled_options ON)
101-
endif()
102-
103-
10494
if(NOT EXECUTORCH_ENABLE_LOGGING)
10595
# Avoid pulling in the logging strings, which can be large. Note that this
10696
# will set the compiler flag for all targets in this directory, and for all
@@ -110,10 +100,6 @@ endif()
110100

111101
add_definitions(-DET_MIN_LOG_LEVEL=${ET_MIN_LOG_LEVEL})
112102

113-
option(EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
114-
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
115-
${_default_release_disabled_options}
116-
)
117103
if(NOT EXECUTORCH_ENABLE_PROGRAM_VERIFICATION)
118104
# Avoid pulling in the flatbuffer data verification logic, which can add about
119105
# 20kB. Note that this will set the compiler flag for all targets in this

tools/cmake/preset/default.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ define_overridable_option(
4444
"Build with the given ET_MIN_LOG_LEVEL value"
4545
STRING "Info"
4646
)
47+
define_overridable_option(
48+
EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
49+
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
50+
BOOL ${_is_build_type_debug}
51+
)
4752

4853
# MARK: - Validations
4954
# At this point all the options should be configured with their final value.

0 commit comments

Comments
 (0)