summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-02-13 22:58:48 +0800
committerruki <[email protected]>2023-02-13 22:58:48 +0800
commit4b42528d48d5d062027f2053d3ed75accddb1141 (patch)
tree42fbd48b852110a17bb96c1ee16180bbbdf49a85
parent5239207aa34a2d89501f298e21c298c92a7b0e45 (diff)
check set_kind
-rw-r--r--xmake/plugins/check/checker.lua1
-rw-r--r--xmake/plugins/check/checkers/api/target/kind.lua26
2 files changed, 27 insertions, 0 deletions
diff --git a/xmake/plugins/check/checker.lua b/xmake/plugins/check/checker.lua
index c81bd8591..a6b8bb995 100644
--- a/xmake/plugins/check/checker.lua
+++ b/xmake/plugins/check/checker.lua
@@ -28,6 +28,7 @@ function checkers()
checkers = {
-- target api checkers
["api.target.version"] = {description = "Check version configuration in target."},
+ ["api.target.kind"] = {description = "Check kind configuration in target."},
["api.target.strip"] = {description = "Check strip configuration in target."},
["api.target.optimize"] = {description = "Check optimize configuration in target."},
["api.target.symbols"] = {description = "Check symbols configuration in target."},
diff --git a/xmake/plugins/check/checkers/api/target/kind.lua b/xmake/plugins/check/checkers/api/target/kind.lua
new file mode 100644
index 000000000..e84bf890d
--- /dev/null
+++ b/xmake/plugins/check/checkers/api/target/kind.lua
@@ -0,0 +1,26 @@
+--!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 kind.lua
+--
+
+-- imports
+import(".api_checker")
+
+function main()
+ api_checker.check_targets("kind", {values = {"object", "binary", "static", "shared", "headeronly", "phony"}})
+end