Skip to content

Commit

Permalink
cmake: Renamed savedefconfig with refreshsilent
Browse files Browse the repository at this point in the history
Renamed savedefconfig -> refreshsilent name more consistent with the refresh stage for cmake on github.

Added new savedefconfig to fix
#14281
  • Loading branch information
simbit18 authored and xiaoxiang781216 committed Oct 18, 2024
1 parent 0496984 commit 791d7c9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion cmake/menuconfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ add_custom_target(

# utility target to refresh .config from board's defconfig for GITHUB
add_custom_target(
savedefconfig
refreshsilent
COMMAND ${CMAKE_COMMAND} -E remove -f ${CMAKE_BINARY_DIR}/SAVEconfig
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_BINARY_DIR}/.config
${CMAKE_BINARY_DIR}/SAVEconfig
Expand All @@ -87,3 +87,14 @@ add_custom_target(
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig
${NUTTX_DEFCONFIG}
WORKING_DIRECTORY ${NUTTX_DIR})

# utility target to replace defconfig to board's defconfig
add_custom_target(
savedefconfig
COMMAND ${CMAKE_COMMAND} -E env ${KCONFIG_ENV} savedefconfig --out
${CMAKE_BINARY_DIR}/defconfig.tmp
COMMAND ${CMAKE_COMMAND} -P ${NUTTX_DIR}/cmake/savedefconfig.cmake
${CMAKE_BINARY_DIR}/.config ${CMAKE_BINARY_DIR}/defconfig.tmp
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/defconfig
${NUTTX_DEFCONFIG}
WORKING_DIRECTORY ${NUTTX_DIR})
4 changes: 2 additions & 2 deletions tools/testbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ function refresh_cmake {
kconfig-tweak --file $nuttx/build/.config -d $toolchain
fi

if ! cmake --build build -t savedefconfig 1>/dev/null; then
cmake --build build -t savedefconfig
if ! cmake --build build -t refreshsilent 1>/dev/null; then
cmake --build build -t refreshsilent
fail=1
fi

Expand Down

0 comments on commit 791d7c9

Please sign in to comment.