diff options
Diffstat (limited to 'xmake/core/project/policy.lua')
| -rw-r--r-- | xmake/core/project/policy.lua | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/xmake/core/project/policy.lua b/xmake/core/project/policy.lua new file mode 100644 index 000000000..6b097845c --- /dev/null +++ b/xmake/core/project/policy.lua @@ -0,0 +1,52 @@ +--!A cross-platform build utility based on Lua +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- +-- Copyright (C) 2015-2020, TBOOX Open Source Group. +-- +-- @author ruki +-- @file policy.lua +-- + +-- define module: policy +local policy = policy or {} + +-- load modules +local os = require("base/os") +local io = require("base/io") +local path = require("base/path") +local table = require("base/table") +local utils = require("base/utils") +local string = require("base/string") + +-- get all defined policies +function policy.policies() + local policies = policy._POLICIES + if not policies then + policies = + { + ["check.auto_ignore_flags"] = { description = "Enable check and ignore unsupported flags automatically.", default = true, type = "boolean"}, + ["check.auto_map_flags"] = { description = "Enable map gcc flags to the current compiler and linker automatically.", default = true, type = "boolean"} + } + policy._POLICIES = policies + end + return policies +end + +-- check policy value +function policy.check(name, value) + return value +end + +-- return module: policy +return policy |
