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>
This commit is contained in:
parent
048ccccee0
commit
e3c2cf7a04
1 changed files with 6 additions and 2 deletions
|
|
@ -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.
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue