summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/cl/cfeatures.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-07-07 09:57:02 +0800
committerruki <[email protected]>2017-07-07 09:57:02 +0800
commit417aa9a8fce9eb8f0908a2e580bb6b15d2a4ab8f (patch)
tree4a12f678629f2ac5c608f31eef92dea8d2134173 /xmake/modules/detect/tools/cl/cfeatures.lua
parent78589dc79a62cb3102b6f7a3b05c03ffa38b9f0d (diff)
impl cl.features
Diffstat (limited to 'xmake/modules/detect/tools/cl/cfeatures.lua')
-rw-r--r--xmake/modules/detect/tools/cl/cfeatures.lua42
1 files changed, 42 insertions, 0 deletions
diff --git a/xmake/modules/detect/tools/cl/cfeatures.lua b/xmake/modules/detect/tools/cl/cfeatures.lua
new file mode 100644
index 000000000..5a4998f84
--- /dev/null
+++ b/xmake/modules/detect/tools/cl/cfeatures.lua
@@ -0,0 +1,42 @@
+--!The Make-like Build Utility based on Lua
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you 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 - 2017, TBOOX Open Source Group.
+--
+-- @author ruki
+-- @file cfeatures.lua
+--
+
+-- set features
+function _set(feature, condition)
+ _g.features = _g.features or {}
+ _g.features[feature] = condition
+end
+
+-- get features
+function main()
+
+ -- TODO
+ -- set features
+ _set("c_static_assert", "defined(_WIN32)")
+ _set("c_restrict", "defined(_MSC_VER)")
+
+ -- get features
+ return _g.features
+end
+