diff options
| author | ruki <[email protected]> | 2020-10-05 23:16:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-06 20:00:03 +0800 |
| commit | d9c46764bb2e906e7cf8e98ddd70969472ed1c19 (patch) | |
| tree | 574105afa056e15188924ccb1b126d7a08d76ef3 /xmake/modules/detect/tools | |
| parent | b6098b7980f9c05781efe5544c72516bc8de70d7 (diff) | |
add initial icc files
Diffstat (limited to 'xmake/modules/detect/tools')
| -rw-r--r-- | xmake/modules/detect/tools/find_icc.lua | 52 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_icl.lua | 52 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_icpc.lua | 52 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/icc/has_flags.lua | 23 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/icl/has_flags.lua | 23 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/icpc/has_flags.lua | 23 |
6 files changed, 225 insertions, 0 deletions
diff --git a/xmake/modules/detect/tools/find_icc.lua b/xmake/modules/detect/tools/find_icc.lua new file mode 100644 index 000000000..789a16a9e --- /dev/null +++ b/xmake/modules/detect/tools/find_icc.lua @@ -0,0 +1,52 @@ +--!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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file find_icc.lua +-- + +-- imports +import("lib.detect.find_program") +import("lib.detect.find_programver") + +-- find icc +-- +-- @param opt the argument options, e.g. {version = true} +-- +-- @return program, version +-- +-- @code +-- +-- local icc = find_icc() +-- local icc, version, hintname = find_icc({program = "icc", version = true}) +-- +-- @endcode +-- +function main(opt) + + -- init options + opt = opt or {} + + -- find program + local program = find_program(opt.program or "icc", opt) + + -- find program version + 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/find_icl.lua b/xmake/modules/detect/tools/find_icl.lua new file mode 100644 index 000000000..f61f0ce76 --- /dev/null +++ b/xmake/modules/detect/tools/find_icl.lua @@ -0,0 +1,52 @@ +--!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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file find_icl.lua +-- + +-- imports +import("lib.detect.find_program") +import("lib.detect.find_programver") + +-- find icl +-- +-- @param opt the argument options, e.g. {version = true} +-- +-- @return program, version +-- +-- @code +-- +-- local icl = find_icl() +-- local icl, version, hintname = find_icl({program = "icl", version = true}) +-- +-- @endcode +-- +function main(opt) + + -- init options + opt = opt or {} + + -- find program + local program = find_program(opt.program or "icl", opt) + + -- find program version + 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/find_icpc.lua b/xmake/modules/detect/tools/find_icpc.lua new file mode 100644 index 000000000..6c806cad6 --- /dev/null +++ b/xmake/modules/detect/tools/find_icpc.lua @@ -0,0 +1,52 @@ +--!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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file find_icpc.lua +-- + +-- imports +import("lib.detect.find_program") +import("lib.detect.find_programver") + +-- find icpc +-- +-- @param opt the argument options, e.g. {version = true} +-- +-- @return program, version +-- +-- @code +-- +-- local icpc = find_icpc() +-- local icpc, version, hintname = find_icpc({program = "icpc", version = true}) +-- +-- @endcode +-- +function main(opt) + + -- init options + opt = opt or {} + + -- find program + local program = find_program(opt.program or "icpc", opt) + + -- find program version + 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/icc/has_flags.lua b/xmake/modules/detect/tools/icc/has_flags.lua new file mode 100644 index 000000000..6ac2ce551 --- /dev/null +++ b/xmake/modules/detect/tools/icc/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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file has_flags.lua +-- + +-- imports +inherit("detect.tools.gcc.has_flags") + diff --git a/xmake/modules/detect/tools/icl/has_flags.lua b/xmake/modules/detect/tools/icl/has_flags.lua new file mode 100644 index 000000000..81573039e --- /dev/null +++ b/xmake/modules/detect/tools/icl/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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file has_flags.lua +-- + +-- imports +inherit("detect.tools.cl.has_flags") + diff --git a/xmake/modules/detect/tools/icpc/has_flags.lua b/xmake/modules/detect/tools/icpc/has_flags.lua new file mode 100644 index 000000000..50d4f59d9 --- /dev/null +++ b/xmake/modules/detect/tools/icpc/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-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file has_flags.lua +-- + +-- imports +inherit("detect.tools.gxx.has_flags") + |
