summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-05-21 18:01:27 +0800
committerOpportunityLiu <[email protected]>2019-05-21 18:01:27 +0800
commit339b0a09220f367c76efbd70603014d8b05ccf00 (patch)
treeef7870130d588be3cf5701c53984fc452e496e36
parenta8c3110cbd68ee41150daae583ae8789eeadcaaf (diff)
reduce code
-rw-r--r--xmake/modules/core/tools/nvcc.lua9
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