From 339b0a09220f367c76efbd70603014d8b05ccf00 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Tue, 21 May 2019 18:01:27 +0800 Subject: reduce code --- xmake/modules/core/tools/nvcc.lua | 9 +++------ 1 file 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 -- cgit v1.3.1