diff options
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index cfc60f696..b3d7fa35d 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -2234,6 +2234,34 @@ 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 + opt.configs = self:_generate_build_configs(opt.configs, {sourcekind = "mm"}) + 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 + opt.configs = self:_generate_build_configs(opt.configs, {sourcekind = "mxx"}) + return sandbox_module.import("lib.detect.check_mxxsnippets", {anonymous = true})(snippets, opt) +end + -- the current mode is belong to the given modes? function package._api_is_mode(interp, ...) return config.is_mode(...) |
