diff options
| author | ruki <[email protected]> | 2015-05-20 11:20:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-20 11:20:11 +0800 |
| commit | f78e2768746980830994537ebb03397a31276f1d (patch) | |
| tree | 095a9cec9dcce55ed76f73292c041209e91096f2 /xmake/scripts/platform/platform.lua | |
| parent | d0c91342731cdbaa3e25e239574ce41593297ee1 (diff) | |
add get format interfaces for platform
Diffstat (limited to 'xmake/scripts/platform/platform.lua')
| -rw-r--r-- | xmake/scripts/platform/platform.lua | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/xmake/scripts/platform/platform.lua b/xmake/scripts/platform/platform.lua index e6c369236..7ae8af969 100644 --- a/xmake/scripts/platform/platform.lua +++ b/xmake/scripts/platform/platform.lua @@ -44,7 +44,27 @@ function platform.init() return p.init(configs) end --- dump configs +-- get the given configure +function platform.get(name) + + -- check + assert(platform._CONFIGS) + + -- get it + return platform._CONFIGS[name] +end + +-- get the format from the given kind +function platform.format(kind) + + -- get format + local format = platform.get("format") + + -- get it + return format[kind] or {"", ""} +end + +-- dump the platform configure function platform.dump() -- check |
