Skip to content

Commit

Permalink
cmake: add a comment header to zephyr_settings.txt
Browse files Browse the repository at this point in the history
I saw a user wondering what this is for and and where it comes from.
Provide a comment header with some explanation and a pointer to where
to find out more.

Signed-off-by: Martí Bolívar <[email protected]>
  • Loading branch information
mbolivar-nordic authored and cfriedt committed Aug 10, 2021
1 parent 4830571 commit 361956b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/zephyr_module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ if(WEST OR ZEPHYR_MODULES)
endif()

if(EXISTS ${ZEPHYR_SETTINGS_FILE})
file(STRINGS ${ZEPHYR_SETTINGS_FILE} ZEPHYR_SETTINGS_TXT ENCODING UTF-8)
file(STRINGS ${ZEPHYR_SETTINGS_FILE} ZEPHYR_SETTINGS_TXT ENCODING UTF-8 REGEX "^[^#]")
foreach(setting ${ZEPHYR_SETTINGS_TXT})
# Match <key>:<value> for each line of file, each corresponding to
# a setting. The use of quotes is required due to CMake not supporting
Expand Down
10 changes: 10 additions & 0 deletions scripts/zephyr_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,16 @@ def main():

if args.settings_out:
with open(args.settings_out, 'w', encoding="utf-8") as fp:
fp.write('''\
# WARNING. THIS FILE IS AUTO-GENERATED. DO NOT MODIFY!
#
# This file contains build system settings derived from your modules.
#
# Modules may be set via ZEPHYR_MODULES, ZEPHYR_EXTRA_MODULES,
# and/or the west manifest file.
#
# See the Modules guide for more information.
''')
fp.write(settings)

if args.twister_out:
Expand Down

0 comments on commit 361956b

Please sign in to comment.