Skip to content

Commit

Permalink
Merge pull request #229 from kivancsikert/build/track-ud-debug
Browse files Browse the repository at this point in the history
Track UD_DEBUG as a CMake input
  • Loading branch information
lptr authored Oct 12, 2024
2 parents c263971 + 4251248 commit d1827f6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 10 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ if(UD_GEN STREQUAL "")
endif()
string(TOLOWER "${UD_GEN}" UD_GEN_LOWER)

# Make sure we reconfigure if UD_GEN changes
if(NOT DEFINED UD_DEBUG)
set(UD_DEBUG "$ENV{UD_DEBUG}")
endif()
if(UD_DEBUG STREQUAL "")
message("UD_DEBUG is not set, assuming 0.")
set(UD_GEN 0)
endif()

# Make sure we reconfigure if UD_GEN and UD_DEBUG changes
set_property(GLOBAL PROPERTY UD_GEN_TRACKER "${UD_GEN}")
set_property(GLOBAL PROPERTY UD_DEBUG_TRACKER "${UD_DEBUG}")

if(UD_GEN STREQUAL "MK4")
if (NOT "$ENV{IDF_TARGET}" STREQUAL "esp32s2")
Expand Down
3 changes: 0 additions & 3 deletions main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ idf_component_register(
add_compile_definitions("${UD_GEN}")
add_compile_definitions(FARMHUB_REPORT_MEMORY)

if(NOT DEFINED UD_DEBUG)
set(UD_DEBUG "$ENV{UD_DEBUG}")
endif()
if(UD_DEBUG)
add_compile_definitions(FARMHUB_DEBUG)
add_compile_definitions(DUMP_MQTT)
Expand Down

0 comments on commit d1827f6

Please sign in to comment.