Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track UD_DEBUG as a CMake input #229

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading