diff options
| -rw-r--r-- | xmake/core/tool/builder.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index ba8d44a18..7a2a16949 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -372,8 +372,9 @@ function builder:_preprocess_flags(flags) for _, flag in ipairs(flags) do flag = flag:trim() if #flag > 0 then + local split = false if flag:find(" ", 1, true) then - local split = true + split = true -- ignore e.g. -DTEST="Hello world" if flag:find("\"", 1, true) then local s = flag:gsub("\".-\"", "") @@ -381,11 +382,9 @@ function builder:_preprocess_flags(flags) split = false end end - if split then - table.join2(results, os.argv(flag)) - else - table.insert(results, flag) - end + end + if split then + table.join2(results, os.argv(flag)) else table.insert(results, flag) end |
