diff options
| -rw-r--r-- | xmake/modules/core/tools/nvcc.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua index 8578832e6..5993e9bb8 100644 --- a/xmake/modules/core/tools/nvcc.lua +++ b/xmake/modules/core/tools/nvcc.lua @@ -119,14 +119,11 @@ function nf_warning(self, level) end if warning and host_warning then - return warning .. ' -Xcompiler "' .. host_warning .. '"' - elseif warning then - return warning + warning = warning .. ' -Xcompiler "' .. host_warning .. '"' elseif host_warning then - return '-Xcompiler "' .. host_warning .. '"' - else - return nil + warning = '-Xcompiler "' .. host_warning .. '"' end + return warning end -- make the optimize flag |
