diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index b2058fe75df41c..e32588db436e2c 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -38,12 +38,9 @@ if(NOT "${IDF_TARGET}" STREQUAL "esp32h2") endif() if (NOT CMAKE_BUILD_EARLY_EXPANSION) - if (CONFIG_COMPILER_OPTIMIZATION_DEFAULT OR CONFIG_COMPILER_OPTIMIZATION_NONE) + if (CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE) set(is_debug TRUE) else() - if (NOT CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE) - message(FATAL_ERROR "CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE shall be set") - endif() set(is_debug FALSE) endif() endif()