summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Gatti <a.gatti@frob.it>2025-03-21 02:12:31 +0100
committerDamien George <damien@micropython.org>2025-04-22 12:18:04 +1000
commite3c2cf7a040052143b19ef140fd666f86ec0fbda (patch)
tree58bd21d24f8e229cb0c4be56333f351fda26af6a
parent048ccccee01cdb1f36242d4ee5bba43a6900c891 (diff)
esp32/esp32_common.cmake: Skip BTree module when requested.
This commit makes the BTree module truly optional, as it was unconditionally enabled in the shared CMake script for the port. This meant that if a board/variant did explicitly turn BTree off said request was not honoured by the build system and the BTree module would still be brought in. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
-rw-r--r--ports/esp32/esp32_common.cmake8
1 files changed, 6 insertions, 2 deletions
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index a9827249b..c54f5a540 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -42,7 +42,9 @@ include(${MICROPY_DIR}/py/py.cmake)
if(NOT CMAKE_BUILD_EARLY_EXPANSION)
# Enable extmod components that will be configured by extmod.cmake.
# A board may also have enabled additional components.
- set(MICROPY_PY_BTREE ON)
+ if (NOT DEFINED MICROPY_PY_BTREE)
+ set(MICROPY_PY_BTREE ON)
+ endif()
include(${MICROPY_DIR}/py/usermod.cmake)
include(${MICROPY_DIR}/extmod/extmod.cmake)
@@ -276,7 +278,9 @@ target_include_directories(${MICROPY_TARGET} PUBLIC
)
# Add additional extmod and usermod components.
-target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
+if (MICROPY_PY_BTREE)
+ target_link_libraries(${MICROPY_TARGET} micropy_extmod_btree)
+endif()
target_link_libraries(${MICROPY_TARGET} usermod)
# Extra linker options