Skip to content

Commit

Permalink
[ESP32] Fix adding NDEBUG flag to CPPFLAGS (#30763)
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 authored and pull[bot] committed Jan 9, 2024
1 parent 97f9931 commit 1978592
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 1978592

Please sign in to comment.