summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/g++.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-11 17:08:31 +0800
committerruki <[email protected]>2015-06-11 17:08:31 +0800
commit34850cd997a6e3b29388b126675feb8c5755404e (patch)
tree41fe1bdad50402debea120f81a66792b9f661b68 /xmake/scripts/tools/g++.lua
parent882430fde4f0066e9adbbb664b98612fa4cf3bc1 (diff)
instance different compiler for clang and gcc
Diffstat (limited to 'xmake/scripts/tools/g++.lua')
-rw-r--r--xmake/scripts/tools/g++.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/xmake/scripts/tools/g++.lua b/xmake/scripts/tools/g++.lua
index f60a86ba5..64970b039 100644
--- a/xmake/scripts/tools/g++.lua
+++ b/xmake/scripts/tools/g++.lua
@@ -20,4 +20,19 @@
-- @file g++.lua
--
-return require("tools/gcc")
+-- load modules
+local gcc = require("tools/gcc")
+
+-- define module: gxx
+local gxx = gxx or {}
+
+-- only copy the interfaces of gcc to g++
+for k, v in pairs(gcc) do
+ if type(v) == "function" then
+ gxx[k] = v
+ end
+end
+
+-- return module: g++
+return gxx
+