diff options
| author | ruki <[email protected]> | 2017-07-06 00:06:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-06 00:06:03 +0800 |
| commit | 5fd1bfd5c5e2d6a8e72f033325a448a76737d738 (patch) | |
| tree | 9d0ec595b10b0142cfd8f342f37fe249a068f5c6 /xmake/modules/lib/detect | |
| parent | 5a1c8b7a4938745c40f7ad14de4823b09e979b7c (diff) | |
add gcc and clang features
Diffstat (limited to 'xmake/modules/lib/detect')
| -rw-r--r-- | xmake/modules/lib/detect/features.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/has_features.lua | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/xmake/modules/lib/detect/features.lua b/xmake/modules/lib/detect/features.lua index e0c11b35f..26ee9a18b 100644 --- a/xmake/modules/lib/detect/features.lua +++ b/xmake/modules/lib/detect/features.lua @@ -28,14 +28,14 @@ import("lib.detect.find_tool") -- get all features of the current tool -- -- @param name the tool name --- @param opt the argument options, .e.g {program = "", flags = {}, toolkind = "[cc|cxx|ld|ar|sh|gc|rc|dc|mm|mxx]"} +-- @param opt the argument options, .e.g {program = "", flags = {}} -- -- @return the features dictionary -- -- @code -- local features = features("clang") -- local features = features("clang", {flags = "-O0", program = "xcrun -sdk macosx clang"}) --- local features = features("clang", {flags = {"-g", "-O0"}, toolkind = "cxx"}) +-- local features = features("clang", {flags = {"-g", "-O0"}}) -- @endcode -- function main(name, opt) @@ -56,7 +56,7 @@ function main(name, opt) opt.programver = tool.version -- init cache and key - local key = tool.program .. "_" .. (tool.version or "") .. "_" .. (opt.toolkind or "") .. table.concat(table.wrap(opt.flags), ",") + local key = tool.program .. "_" .. (tool.version or "") .. "_" .. table.concat(table.wrap(opt.flags), ",") _g._RESULTS = _g._RESULTS or {} local results = _g._RESULTS diff --git a/xmake/modules/lib/detect/has_features.lua b/xmake/modules/lib/detect/has_features.lua index dc2950a71..c554845c2 100644 --- a/xmake/modules/lib/detect/has_features.lua +++ b/xmake/modules/lib/detect/has_features.lua @@ -30,14 +30,14 @@ import("lib.detect.features", {alias = "get_features"}) -- -- @param name the tool name -- @param features the features --- @param opt the argument options, .e.g {verbose = false, flags = {}, program = "", toolkind = "[cc|cxx|ld|ar|sh|gc|rc|dc|mm|mxx]"} +-- @param opt the argument options, .e.g {verbose = false, flags = {}, program = ""}} -- -- @return the supported features or nil -- -- @code -- local features = has_features("clang", "cxx_constexpr") -- local features = has_features("clang", {"cxx_constexpr", "c_static_assert"}, {flags = {"-g", "-O0"}, program = "xcrun -sdk macosx clang"}) --- local features = has_features("clang", {"cxx_constexpr", "c_static_assert"}, {flags = "-g", toolkind = "cxx"}) +-- local features = has_features("clang", {"cxx_constexpr", "c_static_assert"}, {flags = "-g"}) -- @endcode -- function main(name, features, opt) |
