[cmake] make TCP configurable with OT_TCP option (#7306)

This commit is contained in:
Eduardo Montoya
2022-01-18 20:31:39 +01:00
committed by GitHub
parent 45101c5955
commit 0b3f87c588
5 changed files with 14 additions and 3 deletions
+2
View File
@@ -391,6 +391,8 @@ else()
message(FATAL_ERROR "Invalid max RCP restoration count: ${OT_RCP_RESTORATION_MAX_COUNT}")
endif()
option(OT_EXCLUDE_TCPLP_LIB "exclude TCPlp library from build")
# Checks
if(OT_PLATFORM_UDP AND OT_UDP_FORWARD)
message(FATAL_ERROR "OT_PLATFORM_UDP and OT_UDP_FORWARD are exclusive")
+1
View File
@@ -37,6 +37,7 @@ This page lists the available common switches with description. Unless stated ot
| DUA | OT_DUA | Enables the Domain Unicast Address feature for Thread 1.2. |
| DYNAMIC_LOG_LEVEL | not implemented | Enables the dynamic log level feature. Enable this switch if OpenThread log level is required to be set at runtime. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
| ECDSA | OT_ECDSA | Enables support for Elliptic Curve Digital Signature Algorithm. Enable this switch if ECDSA digital signature is used by application. |
| EXCLUDE_TCPLP_LIB | OT_EXCLUDE_TCPLP_LIB | Exclude TCPlp library from the build. |
| EXTERNAL_HEAP | OT_EXTERNAL_HEAP | Enables support for external heap. Enable this switch if the platform uses its own heap. Make sure to specify the external heap Calloc and Free functions to be used by the OpenThread stack. |
| FULL_LOGS | OT_FULL_LOGS | Enables all log levels and regions. This switch sets the log level to OT_LOG_LEVEL_DEBG and turns on all region flags. See [Logging guide](https://openthread.io/guides/build/logs) to learn more. |
| HISTORY_TRACKER | OT_HISTORY_TRACKER | Enables support for History Tracker. |
+4 -1
View File
@@ -43,6 +43,9 @@ target_sources(openthread-ftd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-ftd
PRIVATE
${OT_MBEDTLS}
tcplp
ot-config
)
if(NOT OT_EXCLUDE_TCPLP_LIB)
target_link_libraries(openthread-ftd PRIVATE tcplp)
endif()
+4 -1
View File
@@ -43,6 +43,9 @@ target_sources(openthread-mtd PRIVATE ${COMMON_SOURCES})
target_link_libraries(openthread-mtd
PRIVATE
${OT_MBEDTLS}
tcplp
ot-config
)
if(NOT OT_EXCLUDE_TCPLP_LIB)
target_link_libraries(openthread-mtd PRIVATE tcplp)
endif()
+3 -1
View File
@@ -30,4 +30,6 @@ if(NOT OT_EXTERNAL_MBEDTLS)
add_subdirectory(mbedtls)
endif()
add_subdirectory(tcplp)
if(NOT OT_EXCLUDE_TCPLP_LIB)
add_subdirectory(tcplp)
endif()