diff options
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 5993e9bb8..b284313a7 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -106,7 +106,7 @@ function nf_warning(self, level) , everything = "-Weverything -Wall -Wextra -Weffc++" , error = "-Werror" } - + local warning = maps[level] local host_warning = nil @@ -118,12 +118,11 @@ function nf_warning(self, level) host_warning = gcc_clang_maps[level] end - if warning and host_warning then - warning = warning .. ' -Xcompiler "' .. host_warning .. '"' - elseif host_warning then - warning = '-Xcompiler "' .. host_warning .. '"' + if host_warning then + warning = ((warning or "") .. ' -Xcompiler "' .. host_warning .. '"'):trim() end return warning + end -- make the optimize flag |
