cmake: Minor refactor
Minor refactor of build script for readability and diff-ability. Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
This commit is contained in:
parent
abc47a0717
commit
64f858874d
|
@ -1,6 +1,10 @@
|
|||
set(CONFIGS_C ${CMAKE_CURRENT_BINARY_DIR}/misc/generated/configs.c)
|
||||
|
||||
file(STRINGS ${AUTOCONF_H} CONFIG_LIST REGEX "^#define CONFIG_")
|
||||
file(STRINGS
|
||||
${AUTOCONF_H}
|
||||
CONFIG_LIST
|
||||
REGEX "^#define CONFIG_"
|
||||
)
|
||||
foreach (CONFIG ${CONFIG_LIST})
|
||||
string(REGEX REPLACE "#define (CONFIG_[A-Z|_|0-9]*) (.*)" "GEN_ABSOLUTE_SYM(\\1, \\2)" CONFIG ${CONFIG})
|
||||
string(REGEX REPLACE "\"(.*)\"" "1" CONFIG ${CONFIG})
|
||||
|
|
Loading…
Reference in a new issue