summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools
diff options
context:
space:
mode:
authorruki <[email protected]>2024-07-09 22:49:00 +0800
committerruki <[email protected]>2024-07-09 22:49:00 +0800
commitcbb8f14330263b94a467102ae96c2ae00f79ce33 (patch)
tree6a1fff4eccc34538f66a335d47df2d0820ffe9a1 /xmake/modules/detect/tools
parent695b6728210692855a7b5cdeb666a926dac175d7 (diff)
add ifx toolchain
Diffstat (limited to 'xmake/modules/detect/tools')
-rw-r--r--xmake/modules/detect/tools/find_icx.lua14
-rw-r--r--xmake/modules/detect/tools/find_ifx.lua46
-rw-r--r--xmake/modules/detect/tools/ifx/has_flags.lua23
3 files changed, 73 insertions, 10 deletions
diff --git a/xmake/modules/detect/tools/find_icx.lua b/xmake/modules/detect/tools/find_icx.lua
index 1d70a2967..bafc15c23 100644
--- a/xmake/modules/detect/tools/find_icx.lua
+++ b/xmake/modules/detect/tools/find_icx.lua
@@ -15,14 +15,14 @@
-- Copyright (C) 2015-present, TBOOX Open Source Group.
--
-- @author ruki
--- @file find_icc.lua
+-- @file find_icx.lua
--
-- imports
import("lib.detect.find_program")
import("lib.detect.find_programver")
--- find icc
+-- find icx
--
-- @param opt the argument options, e.g. {version = true}
--
@@ -30,20 +30,14 @@ import("lib.detect.find_programver")
--
-- @code
--
--- local icc = find_icc()
--- local icc, version, hintname = find_icc({program = "icc", version = true})
+-- local icx = find_icx()
+-- local icx, version, hintname = find_icx({program = "icx", version = true})
--
-- @endcode
--
function main(opt)
-
- -- init options
opt = opt or {}
-
- -- find program
local program = find_program(opt.program or "icx", opt)
-
- -- find program version
local version = nil
if program and opt.version then
version = find_programver(program, opt)
diff --git a/xmake/modules/detect/tools/find_ifx.lua b/xmake/modules/detect/tools/find_ifx.lua
new file mode 100644
index 000000000..a59a02927
--- /dev/null
+++ b/xmake/modules/detect/tools/find_ifx.lua
@@ -0,0 +1,46 @@
+--!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 find_ifx.lua
+--
+
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
+
+-- find ifx
+--
+-- @param opt the argument options, e.g. {version = true}
+--
+-- @return program, version
+--
+-- @code
+--
+-- local ifx = find_ifx()
+-- local ifx, version, hintname = find_ifx({program = "ifx", version = true})
+--
+-- @endcode
+--
+function main(opt)
+ opt = opt or {}
+ local program = find_program(opt.program or "icx", opt)
+ local version = nil
+ if program and opt.version then
+ version = find_programver(program, opt)
+ end
+ return program, version
+end
diff --git a/xmake/modules/detect/tools/ifx/has_flags.lua b/xmake/modules/detect/tools/ifx/has_flags.lua
new file mode 100644
index 000000000..d8c6f2792
--- /dev/null
+++ b/xmake/modules/detect/tools/ifx/has_flags.lua
@@ -0,0 +1,23 @@
+--!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 has_flags.lua
+--
+
+-- imports
+inherit("detect.tools.clang.has_flags")
+