[posix] move core config options from cmake file to the header file (#4713)

This commit moves the OpenThread core config definitions (like
`OPENTHREAD_CONFIG_LOG_OUTPUT`) from the `CMakeLists.txt` file into
the `openthread-core-posix-config.h`. This help allow a project/user
specific config header file to override the default config definition
(e.g., toranj config for posix).
This commit is contained in:
Abtin Keshavarzian
2020-03-25 22:38:51 -07:00
committed by GitHub
parent c15664bccd
commit 234c263be0
2 changed files with 24 additions and 3 deletions
-3
View File
@@ -44,9 +44,6 @@ if(NOT OT_CONFIG)
endif()
list(APPEND OT_PLATFORM_DEFINES
"OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=1"
"OPENTHREAD_CONFIG_LOG_OUTPUT=OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED"
"OPENTHREAD_CONFIG_NCP_UART_ENABLE=1"
"OPENTHREAD_POSIX=1"
"OPENTHREAD_POSIX_CONFIG_RCP_UART_ENABLE=1"
)
@@ -44,6 +44,30 @@
#define OPENTHREAD_CONFIG_LOG_PLATFORM 1
#endif
/**
* @def OPENTHREAD_CONFIG_LOG_OUTPUT
*
* Select the log output.
*
*/
#ifndef OPENTHREAD_CONFIG_LOG_OUTPUT
#define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_PLATFORM_DEFINED
#endif
/**
* @def OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
*
* Define as 1 to enable dynamic log level control.
*
* Note that the OPENTHREAD_CONFIG_LOG_LEVEL determines the log level at
* compile time. The dynamic log level control (if enabled) only allows
* decreasing the log level from the compile time value.
*
*/
#ifndef OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE
#define OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE 1
#endif
/**
* @def OPENTHREAD_CONFIG_PLATFORM_INFO
*