Skip to content

Commit

Permalink
cmake: Minor refactor
Browse files Browse the repository at this point in the history
Minor refactor of build script for readability and diff-ability.

Signed-off-by: Sebastian Bøe <[email protected]>
  • Loading branch information
SebastianBoe authored and Anas Nashif committed Mar 21, 2018
1 parent abc47a0 commit 64f8588
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/generated/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})
Expand Down

0 comments on commit 64f8588

Please sign in to comment.