Merge branch 'bugfix/kconfig_cmake_escape' into 'master'

confgen.py: Escape special characters for cmake

Closes IDFGH-2677

See merge request espressif/esp-idf!7580
pull/4797/head
Angus Gratton 2020-02-18 08:13:13 +08:00
commit b92882a0e6
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -417,6 +417,8 @@ def write_cmake(deprecated_options, config, filename):
val = sym.str_value
if sym.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and val == "n":
val = "" # write unset values as empty variables
elif sym.orig_type == kconfiglib.STRING:
val = kconfiglib.escape(val)
write("set({}{} \"{}\")\n".format(
prefix, sym.name, val))