summaryrefslogtreecommitdiff
path: root/xmake/modules/core
diff options
context:
space:
mode:
authorruki <[email protected]>2022-05-01 22:17:30 +0800
committerruki <[email protected]>2022-05-01 22:17:47 +0800
commite456ecaf8539a67d5e0d3354d7bd5eb9727852a0 (patch)
treec9205b4c853a0dbe6c2da9f9c5c789250d240a09 /xmake/modules/core
parent6948a822ea35dc61092dedadfaaa7e542c81f202 (diff)
add nvc and nvc++ support
Diffstat (limited to 'xmake/modules/core')
-rw-r--r--xmake/modules/core/tools/nvc.lua24
-rw-r--r--xmake/modules/core/tools/nvcxx.lua24
-rw-r--r--xmake/modules/core/tools/nvfortran.lua39
3 files changed, 87 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/nvc.lua b/xmake/modules/core/tools/nvc.lua
new file mode 100644
index 000000000..1ccc1770d
--- /dev/null
+++ b/xmake/modules/core/tools/nvc.lua
@@ -0,0 +1,24 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file nvc.lua
+--
+
+-- inherit gcc
+inherit("gcc")
+
+
diff --git a/xmake/modules/core/tools/nvcxx.lua b/xmake/modules/core/tools/nvcxx.lua
new file mode 100644
index 000000000..15bbb82ea
--- /dev/null
+++ b/xmake/modules/core/tools/nvcxx.lua
@@ -0,0 +1,24 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file nvcxx.lua
+--
+
+-- inherit gcc
+inherit("gcc")
+
+
diff --git a/xmake/modules/core/tools/nvfortran.lua b/xmake/modules/core/tools/nvfortran.lua
new file mode 100644
index 000000000..bc8343173
--- /dev/null
+++ b/xmake/modules/core/tools/nvfortran.lua
@@ -0,0 +1,39 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file nvfortran.lua
+--
+
+inherit("gfortran")
+import("core.language.language")
+
+-- make the symbol flag
+function nf_symbol(self, level)
+ -- only for source kind
+ local kind = self:kind()
+ if language.sourcekinds()[kind] then
+ local maps = _g.symbol_maps
+ if not maps then
+ maps = {
+ debug = "-g"
+ }
+ _g.symbol_maps = maps
+ end
+ return maps[level .. '_' .. kind] or maps[level]
+ end
+end
+