From 9c1d75cc5bbd4ce78d280bc6562df553224f3970 Mon Sep 17 00:00:00 2001 From: Roland Dobai Date: Wed, 12 Feb 2020 14:25:15 +0100 Subject: [PATCH] confgen.py: Escape special characters for cmake Closes https://github.com/espressif/esp-idf/issues/4751 --- tools/kconfig_new/confgen.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/kconfig_new/confgen.py b/tools/kconfig_new/confgen.py index b94cd6653..84f0fe404 100755 --- a/tools/kconfig_new/confgen.py +++ b/tools/kconfig_new/confgen.py @@ -158,6 +158,8 @@ def write_cmake(config, filename): if sym._write_to_conf: 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)) config.walk_menu(write_node)