diff options
| author | ruki <[email protected]> | 2020-11-29 10:00:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-29 10:00:10 +0800 |
| commit | 3aa65c3dcda3260d8125de9325ffa0284ce3fdae (patch) | |
| tree | 9194adff7fc40328f370d2df9eb30cf31b505194 /xmake/core/tool/builder.lua | |
| parent | fa33e5bfa2ff0cee4ebaf2bc76777e1cc8260c25 (diff) | |
fix preprocess flags
Diffstat (limited to 'xmake/core/tool/builder.lua')
| -rw-r--r-- | xmake/core/tool/builder.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 6b9aec322..e706a9933 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -373,7 +373,13 @@ function builder:_preprocess_flags(flags) flag = flag:trim() if #flag > 0 then if flag:find(" ", 1, true) then - table.join2(results, os.argv(flag)) + -- ignore e.g. -DTEST="Hello world" + local s = flag:gsub("\".-\"", "") + if s:find(" ", 1, true) then + table.join2(results, os.argv(flag)) + else + table.insert(results, flag) + end else table.insert(results, flag) end |
