Skip to content

Commit

Permalink
[ESP32] Fix adding NDEBUG flag to CPPFLAGS (project-chip#30763) (proj…
Browse files Browse the repository at this point in the history
…ect-chip#31728)

In esp-idf, NDEBUG flag is added to CPPFLAGS only if assertions are
disabled. Making this inline to that.
  • Loading branch information
shubhamdp authored Jan 29, 2024
1 parent f2e5b70 commit 1c9b875
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions config/esp32/components/chip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1c9b875

Please sign in to comment.