diff options
| author | ruki <[email protected]> | 2021-07-30 22:35:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-07-30 22:35:48 +0800 |
| commit | 8f9895cb26b78fdb33ab25ca086caf7d21b29802 (patch) | |
| tree | 3ebd695fae7b478bf17e6f58db15a5bf8f2c4f8f /tests | |
| parent | 37acf62ce546f31d2eab0350bf1fb649e2ea5bb1 (diff) | |
improve to compile autogen code
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/projects/other/autogen_code/.gitignore | 8 | ||||
| -rw-r--r-- | tests/projects/other/autogen_code/test.lua | 3 | ||||
| -rw-r--r-- | tests/projects/other/autogen_code/xmake.lua | 20 |
3 files changed, 31 insertions, 0 deletions
diff --git a/tests/projects/other/autogen_code/.gitignore b/tests/projects/other/autogen_code/.gitignore new file mode 100644 index 000000000..152105761 --- /dev/null +++ b/tests/projects/other/autogen_code/.gitignore @@ -0,0 +1,8 @@ +# Xmake cache +.xmake/ +build/ + +# MacOS Cache +.DS_Store + + diff --git a/tests/projects/other/autogen_code/test.lua b/tests/projects/other/autogen_code/test.lua new file mode 100644 index 000000000..b57362078 --- /dev/null +++ b/tests/projects/other/autogen_code/test.lua @@ -0,0 +1,3 @@ +function main(t) + t:build() +end diff --git a/tests/projects/other/autogen_code/xmake.lua b/tests/projects/other/autogen_code/xmake.lua new file mode 100644 index 000000000..fb40d8e9c --- /dev/null +++ b/tests/projects/other/autogen_code/xmake.lua @@ -0,0 +1,20 @@ +add_rules("mode.debug", "mode.release") + +target("autogen_code") + set_kind("binary") + add_files("$(buildir)/autogen.cpp", {always_added = true}) + before_build(function (target) + io.writefile("$(buildir)/autogen.cpp", [[ +#include <iostream> + +using namespace std; + +int main(int argc, char** argv) +{ + cout << "hello world!" << endl; + return 0; +} + ]]) + end) + + |
