diff options
| author | ruki <[email protected]> | 2017-07-05 20:48:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-05 20:48:55 +0800 |
| commit | 6e0271d2e38f9b4d48ec271af225f71a0faa4f49 (patch) | |
| tree | 3411187f6d73ad5d0e254aa9d681ea94e7ce9915 | |
| parent | a8d5da851d1d469587adea086c65d61ae20c50ef (diff) | |
rename has_cxsnippets to check_vxsnippets
| -rw-r--r-- | xmake/core/project/option.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/check_cxsnippets.lua (renamed from xmake/modules/lib/detect/has_cxsnippets.lua) | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 501f9ce69..e7231de8b 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -58,8 +58,8 @@ end -- check option for c/c++ function option:_cx_check() - -- import has_cxsnippets() - self._has_cxsnippets = self._has_cxsnippets or import("lib.detect.has_cxsnippets") + -- import check_cxsnippets() + self._check_cxsnippets = self._check_cxsnippets or import("lib.detect.check_cxsnippets") -- check for c and c++ for _, kind in ipairs({"c", "cxx"}) do @@ -81,7 +81,7 @@ function option:_cx_check() end -- check it - local ok, results_or_errors = sandbox.load(self._has_cxsnippets, snippets, {target = self, sourcekind = sourcekind, types = types, funcs = funcs, includes = includes}) + local ok, results_or_errors = sandbox.load(self._check_cxsnippets, snippets, {target = self, sourcekind = sourcekind, types = types, funcs = funcs, includes = includes}) if not ok then return false, results_or_errors end diff --git a/xmake/modules/lib/detect/has_cxsnippets.lua b/xmake/modules/lib/detect/check_cxsnippets.lua index 59ef12872..812d55c08 100644 --- a/xmake/modules/lib/detect/has_cxsnippets.lua +++ b/xmake/modules/lib/detect/check_cxsnippets.lua @@ -19,7 +19,7 @@ -- Copyright (C) 2015 - 2017, TBOOX Open Source Group. -- -- @author ruki --- @file has_csnippets.lua +-- @file check_cxsnippets.lua -- -- imports @@ -113,7 +113,7 @@ function _sourcecode(snippets, opt) return sourcecode end --- has the given c snippets? +-- check the given c snippets? -- -- @param snippets the snippets -- @param opt the argument options @@ -130,8 +130,8 @@ end -- @return true or false -- -- @code --- local ok = has_csnippets("void test() {}") --- local ok = has_csnippets({"void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"}) +-- local ok = check_cxsnippets("void test() {}") +-- local ok = check_cxsnippets({"void test(){}", "#define TEST 1"}, {types = "wchar_t", includes = "stdio.h"}) -- @endcode -- function main(snippets, opt) |
