From 8d75606dbf979386ed314bcbc01ef38dcfa10a5e Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 21 Mar 2023 00:51:51 +0800 Subject: add check_msnippets for target --- xmake/core/project/target.lua | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index f30807e7c..092c2b7fb 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -2394,6 +2394,32 @@ function _instance:check_cxxsnippets(snippets, opt) return sandbox_module.import("lib.detect.check_cxxsnippets", {anonymous = true})(snippets, opt) end +-- check the given objc snippets? +-- +-- @param snippets the snippets +-- @param opt the argument options, e.g. {includes = "xxx.h", configs = {defines = ""}} +-- +-- @return true or false, errors +-- +function _instance:check_msnippets(snippets, opt) + opt = opt or {} + opt.target = self + return sandbox_module.import("lib.detect.check_msnippets", {anonymous = true})(snippets, opt) +end + +-- check the given objc++ snippets? +-- +-- @param snippets the snippets +-- @param opt the argument options, e.g. {includes = "xxx.h", configs = {defines = ""}} +-- +-- @return true or false, errors +-- +function _instance:check_mxxsnippets(snippets, opt) + opt = opt or {} + opt.target = self + return sandbox_module.import("lib.detect.check_mxxsnippets", {anonymous = true})(snippets, opt) +end + -- get project function target._project() return target._PROJECT -- cgit v1.3.1