Explorar el Código

confgen.py: Escape special characters for cmake

Closes https://github.com/espressif/esp-idf/issues/4751
Roland Dobai hace 6 años
padre
commit
9c1d75cc5b
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      tools/kconfig_new/confgen.py

+ 2 - 0
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)