Skip to content

Commit 4b49a8c

Browse files
mattkrasslceWolf
authored andcommitted
PR feedback
1 parent 0c1a527 commit 4b49a8c

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

lua/cmake-tools/kits.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,17 @@ function kits.build_env_and_args(kit_name, escape, cwd, global_kits_path)
126126
if kit.cmakeSettings then
127127
for k, v in pairs(kit.cmakeSettings) do
128128
if type(v) == "boolean" then
129-
add_args({ "-D" .. k .. ":BOOL=" .. string.upper(string.format("%s", v)) })
129+
if escape then
130+
add_args({ "-D" .. k .. ":BOOL=" .. '"' .. string.upper(tostring(v)) .. '"' })
131+
else
132+
add_args({ "-D" .. k .. ":BOOL=" .. string.upper(tostring(v)) })
133+
end
130134
else
131-
add_args({ "-D" .. k .. ":STRING=" .. string.format("%s", v) })
135+
if escape then
136+
add_args({ "-D" .. k .. ":STRING=" .. '"' .. v '"' })
137+
else
138+
add_args({ "-D" .. k .. ":STRING=" .. v })
139+
end
132140
end
133141
end
134142
end

0 commit comments

Comments
 (0)