mirror of
https://github.com/apache/nuttx.git
synced 2026-03-23 14:05:12 +08:00
tools/ci: migrate some ci build configurations to CMake
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -321,6 +321,7 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/.config OR NOT "${NUTTX_DEFCONFIG}" STREQUAL
|
||||
# Do olddefconfig step to expand the abbreviated defconfig into normal config
|
||||
execute_process(
|
||||
COMMAND olddefconfig
|
||||
ERROR_VARIABLE KCONFIG_ERROR
|
||||
OUTPUT_VARIABLE KCONFIG_OUTPUT
|
||||
RESULT_VARIABLE KCONFIG_STATUS
|
||||
WORKING_DIRECTORY ${NUTTX_DIR})
|
||||
@@ -333,6 +334,15 @@ if(NOT EXISTS ${CMAKE_BINARY_DIR}/.config OR NOT "${NUTTX_DEFCONFIG}" STREQUAL
|
||||
configure_file(${CMAKE_BINARY_DIR}/.config ${CMAKE_BINARY_DIR}/.config.orig
|
||||
COPYONLY)
|
||||
|
||||
string(REPLACE "\n" ";" KCONFIG_ESTRING ${KCONFIG_ERROR})
|
||||
foreach(estring ${KCONFIG_ESTRING})
|
||||
string(REGEX MATCH "the 'modules' option is not supported" result
|
||||
${estring})
|
||||
if(NOT result)
|
||||
message(WARNING "Kconfig Configuration Error: ${estring}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(KCONFIG_STATUS AND NOT KCONFIG_STATUS EQUAL 0)
|
||||
message(
|
||||
FATAL_ERROR
|
||||
@@ -544,13 +554,9 @@ if(DEFINED PREPROCES)
|
||||
add_custom_command(
|
||||
OUTPUT ${LD_SCRIPT_TMP}
|
||||
DEPENDS ${ldscript}
|
||||
COMMAND
|
||||
${PREPROCES}
|
||||
-I${CMAKE_BINARY_DIR}/include
|
||||
-I${NUTTX_CHIP_ABS_DIR}
|
||||
${ldscript} > ${LD_SCRIPT_TMP}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
COMMAND ${PREPROCES} -I${CMAKE_BINARY_DIR}/include -I${NUTTX_CHIP_ABS_DIR}
|
||||
${ldscript} > ${LD_SCRIPT_TMP}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
add_custom_target(ldscript_tmp DEPENDS ${LD_SCRIPT_TMP})
|
||||
add_dependencies(nuttx ldscript_tmp)
|
||||
|
||||
Reference in New Issue
Block a user