Skip to content

Commit fd70e5f

Browse files
wangchdoanchao
authored andcommitted
CMake: Enable both sub-Kconfig and generated menu Kconfig
Currently, nuttx_generate_kconfig() allows a subdirectory to have either a handwritten sub-Kconfig or a generated menu Kconfig, but not both. This patch enables support for having both a sub-Kconfig and a generated menu Kconfig within the same subdirectory. Signed-off-by: Chengdong Wang <[email protected]>
1 parent f641298 commit fd70e5f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmake/nuttx_kconfig.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ function(nuttx_generate_kconfig)
158158
if(EXISTS ${NUTTX_APPS_BINDIR}/${MENUCONFIG})
159159
file(APPEND ${KCONFIG_OUTPUT_FILE}
160160
"source \"${NUTTX_APPS_BINDIR}/${MENUCONFIG}\"\n")
161-
elseif(EXISTS ${SUB_KCONFIG})
161+
endif()
162+
if(EXISTS ${SUB_KCONFIG})
162163
file(APPEND ${KCONFIG_OUTPUT_FILE} "source \"${SUB_KCONFIG}\"\n")
163164
endif()
164165
endforeach()

0 commit comments

Comments
 (0)