File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,24 @@ if(NOT EXECUTORCH_ENABLE_LOGGING)
77
77
add_definitions (-DET_LOG_ENABLED=0 )
78
78
endif ()
79
79
80
+ # Configure log level. Must be one of debug, info, error, fatal.
81
+ set (EXECUTORCH_LOG_LEVEL "Info" CACHE STRING
82
+ "Build with the given ET_MIN_LOG_LEVEL value" )
83
+ string (TOLOWER "${EXECUTORCH_LOG_LEVEL} " LOG_LEVEL_LOWER )
84
+ if (LOG_LEVEL_LOWER STREQUAL "debug" )
85
+ add_definitions (-DET_MIN_LOG_LEVEL=Debug )
86
+ elseif (LOG_LEVEL_LOWER STREQUAL "info" )
87
+ add_definitions (-DET_MIN_LOG_LEVEL=Info )
88
+ elseif (LOG_LEVEL_LOWER STREQUAL "error" )
89
+ add_definitions (-DET_MIN_LOG_LEVEL=Error )
90
+ elseif (LOG_LEVEL_LOWER STREQUAL "fatal" )
91
+ add_definitions (-DET_MIN_LOG_LEVEL=Fatal )
92
+ else ()
93
+ message (SEND_ERROR
94
+ "Unknown log level \" ${EXECUTORCH_LOG_LEVEL} \" . Expected one of Debug, " +
95
+ "Info, Error, or Fatal." )
96
+ endif ()
97
+
80
98
option (EXECUTORCH_ENABLE_PROGRAM_VERIFICATION
81
99
"Build with ET_ENABLE_PROGRAM_VERIFICATION"
82
100
${_default_release_disabled_options} )
Original file line number Diff line number Diff line change 1
1
# Copyright (c) Meta Platforms, Inc. and affiliates.
2
2
# All rights reserved.
3
3
#
4
- # Copyright 2024 Arm Limited and/or its affiliates.
5
- #
6
4
# This source code is licensed under the BSD-style license found in the
7
5
# LICENSE file in the root directory of this source tree.
8
6
@@ -34,6 +32,8 @@ function(executorch_print_configuration_summary)
34
32
message (STATUS " FLATC_EXECUTABLE : ${FLATC_EXECUTABLE} " )
35
33
message (
36
34
STATUS " EXECUTORCH_ENABLE_LOGGING : ${EXECUTORCH_ENABLE_LOGGING} " )
35
+ message (
36
+ STATUS " EXECUTORCH_LOG_LEVEL : ${EXECUTORCH_LOG_LEVEL} " )
37
37
message (STATUS " EXECUTORCH_ENABLE_PROGRAM_VERIFICATION : "
38
38
"${EXECUTORCH_ENABLE_PROGRAM_VERIFICATION} " )
39
39
message (
@@ -46,6 +46,8 @@ function(executorch_print_configuration_summary)
46
46
)
47
47
message (
48
48
STATUS " REGISTER_EXAMPLE_CUSTOM_OPS : ${REGISTER_EXAMPLE_CUSTOM_OPS} " )
49
+ message (STATUS " EXECUTORCH_BUILD_EXTENSION_AOT_UTIL : "
50
+ "${EXECUTORCH_BUILD_EXTENSION_AOT_UTIL} " )
49
51
message (STATUS " EXECUTORCH_BUILD_EXTENSION_DATA_LOADER : "
50
52
"${EXECUTORCH_BUILD_EXTENSION_DATA_LOADER} " )
51
53
message (STATUS " EXECUTORCH_BUILD_EXTENSION_RUNNER_UTIL : "
You can’t perform that action at this time.
0 commit comments