cmake/kconfig.cmake: Don't populate config_kernel_list in nuttx flat builds

This passes __KERNEL__ compilation flag to all modules, which may break some NuttX headers

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen 2023-09-08 18:37:31 +03:00 committed by Julian Oes
parent 4ec4ce5fa9
commit 9bcfd1a7f7
1 changed files with 5 additions and 3 deletions

View File

@ -216,15 +216,17 @@ if(EXISTS ${BOARD_DEFCONFIG})
endforeach()
# Put every module not in userspace also to kernel list
foreach(modpath ${config_module_list})
if (CONFIG_BOARD_PROTECTED)
# Put every module not in userspace also to kernel list
foreach(modpath ${config_module_list})
get_filename_component(module ${modpath} NAME)
list(FIND config_user_list ${module} _index)
if (${_index} EQUAL -1)
list(APPEND config_kernel_list ${modpath})
endif()
endforeach()
endforeach()
endif()
if(PLATFORM)
# set OS, and append specific platform module path