diff options
| author | ruki <[email protected]> | 2023-08-29 23:01:26 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-29 23:01:26 +0800 |
| commit | 404575d33dd364563d0b582c524d6219c1277c49 (patch) | |
| tree | 69d99704f211e46895ed9a82f7c938651ed54e77 /xmake/rules/cppfront/xmake.lua | |
| parent | 990430ca785e293ee81ee39360581fda06de621b (diff) | |
add cppfront rule
Diffstat (limited to 'xmake/rules/cppfront/xmake.lua')
| -rw-r--r-- | xmake/rules/cppfront/xmake.lua | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/xmake/rules/cppfront/xmake.lua b/xmake/rules/cppfront/xmake.lua new file mode 100644 index 000000000..c6e41137c --- /dev/null +++ b/xmake/rules/cppfront/xmake.lua @@ -0,0 +1,38 @@ +--!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-present, TBOOX Open Source Group. +-- +-- @author ruki +-- @file xmake.lua +-- + +-- define rule: cppfront.build +rule("cppfront.build") + set_extensions(".cpp2") + on_load(function(target) + print("load") + end) + on_build_file(function(target, sourcefile, opt) + print("build", sourcefile) + end) + +-- define rule: cppfront +rule("cppfront") + + -- add build rules + add_deps("c++", "cppfront.build") + + -- inherit links and linkdirs of all dependent targets by default + add_deps("utils.inherit.links") |
