nuttx icon indicating copy to clipboard operation
nuttx copied to clipboard

cmake system fails to update config.h

Open yf13 opened this issue 1 year ago • 1 comments

Description

When .config is tweaked, sometimes cmake system doesn't update the include/nuttx/config.h.

Reproducing

To reproduce, try following steps:

  • Find an out-of-tree build folder, do cmake ~/Projects/Nuttx/nuttx -G Ninja -DBOARD_CONFIG=rv-virt/nsh
  • Run ninja to build nuttx
  • Use qemu-system-riscv32 -M virt -nographic -bios nuttx to check it (e.g. run free or hello from NSHJ) then quit.

The repeat the following steps a few times:

  • Run kconfig-tweak -e DEBUG_SCHED_INFO
  • Run ninja to see Re-running CMake... followed by more build logs.
  • Run kconfig-tweak -d DEBUG_SCHED_INFO
  • Run ninja to see Re-runing CMake... followed by more build logs.

We expect to see Re-running CMake... each time after .config is tweaked, however this isn't true if we repeat the above tweaking operations more times.

Currently I have to clean current folder and redo cmake command, and do kconfig-tweak before using ninja. This is tedious.

yf13 avatar May 11 '24 00:05 yf13

@xuxin930 please take a look.

xiaoxiang781216 avatar May 11 '24 01:05 xiaoxiang781216