Skip to content

Commit

Permalink
[ESP32] Fix adding NDEBUG flag to CPPFLAGS
Browse files Browse the repository at this point in the history
In esp-idf, NDEBUG flag is added to CPPFLAGS only if assertions are
disabled. Making this inline to that.
  • Loading branch information
shubhamdp committed Dec 1, 2023
1 parent 223c054 commit 08d057e
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 08d057e

Please sign in to comment.