Skip to content

Commit

Permalink
fix: Fix MD5 option handling
Browse files Browse the repository at this point in the history
In order to avoid breaking changes, the non-prefixed MD5_ENABLED option
has to be handled in a special way instead of using the add_option()
function.

Closes #112
  • Loading branch information
DNedic committed Jul 1, 2024
1 parent 0945b52 commit 09e1192
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ if (DEFINED SERIAL_FLASHER_INTERFACE_UART OR CONFIG_SERIAL_FLASHER_INTERFACE_UAR
list(APPEND defs
SERIAL_FLASHER_INTERFACE_UART
)
add_option(MD5_ENABLED false)
if (DEFINED MD5_ENABLED OR CONFIG_SERIAL_FLASHER_MD5_ENABLED)
list(APPEND defs MD5_ENABLED=1)
endif()

elseif(DEFINED SERIAL_FLASHER_INTERFACE_USB OR CONFIG_SERIAL_FLASHER_INTERFACE_USB STREQUAL "y")
list(APPEND srcs
Expand All @@ -62,7 +64,9 @@ elseif(DEFINED SERIAL_FLASHER_INTERFACE_USB OR CONFIG_SERIAL_FLASHER_INTERFACE_U
list(APPEND defs
SERIAL_FLASHER_INTERFACE_USB
)
add_option(MD5_ENABLED false)
if (DEFINED MD5_ENABLED OR CONFIG_SERIAL_FLASHER_MD5_ENABLED)
list(APPEND defs MD5_ENABLED=1)
endif()

elseif(DEFINED SERIAL_FLASHER_INTERFACE_SPI OR CONFIG_SERIAL_FLASHER_INTERFACE_SPI STREQUAL "y")
list(APPEND srcs
Expand Down

0 comments on commit 09e1192

Please sign in to comment.