Skip to content

Commit

Permalink
cmake: Rename CMake variable out of the reserved CONFIG_ namespace
Browse files Browse the repository at this point in the history
Rename the poorly named CMake variable 'CONFIG_LIST' to
'LIST_OF_CONFIGS' to take it out of the Kconfig-reserved namespace
'CONFIG_*'.

This is a small step towards resolving zephyrproject-rtos#12144

Signed-off-by: Sebastian Bøe <[email protected]>
  • Loading branch information
SebastianBoe authored and nashif committed Mar 4, 2019
1 parent 244451b commit ea7babb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions misc/generated/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ set(CONFIGS_C ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/configs.c)

file(STRINGS
${AUTOCONF_H}
CONFIG_LIST
LIST_OF_CONFIGS
REGEX "^#define CONFIG_"
ENCODING "UTF-8"
)
foreach (CONFIG ${CONFIG_LIST})
foreach (CONFIG ${LIST_OF_CONFIGS})
string(REGEX REPLACE "#define (CONFIG_[A-Z|_|0-9]*) (.*)" "GEN_ABSOLUTE_SYM(\\1, \\2)" CONFIG ${CONFIG})
string(REGEX REPLACE "\"(.*)\"" "1" CONFIG ${CONFIG})
set(GEN_ABS_SYM_LIST "${GEN_ABS_SYM_LIST}${CONFIG};\n")
Expand Down

0 comments on commit ea7babb

Please sign in to comment.