diff options
| author | ruki <[email protected]> | 2021-10-16 23:18:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-10-16 23:18:53 +0800 |
| commit | 194e8abb709553c79d5ee34d9bd4a714aa3004d7 (patch) | |
| tree | 919729e21b2c434e63d3d8d671fdc83adebf53b5 /tests/projects/c/headeronly | |
| parent | bbe1a5c2f7418d085304d1dcd0462cf4b2193497 (diff) | |
add headeronly kind for target
Diffstat (limited to 'tests/projects/c/headeronly')
| -rw-r--r-- | tests/projects/c/headeronly/src/foo.h | 9 | ||||
| -rw-r--r-- | tests/projects/c/headeronly/test.lua | 6 | ||||
| -rw-r--r-- | tests/projects/c/headeronly/xmake.lua | 9 |
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/projects/c/headeronly/src/foo.h b/tests/projects/c/headeronly/src/foo.h new file mode 100644 index 000000000..915f44b87 --- /dev/null +++ b/tests/projects/c/headeronly/src/foo.h @@ -0,0 +1,9 @@ +/*! calculate add(a, b) + * + * @param a the first argument + * @param b the second argument + * + * @return the result + */ +int add(int a, int b); + diff --git a/tests/projects/c/headeronly/test.lua b/tests/projects/c/headeronly/test.lua new file mode 100644 index 000000000..b76241be2 --- /dev/null +++ b/tests/projects/c/headeronly/test.lua @@ -0,0 +1,6 @@ +-- main entry +function main(t) + + -- build project + t:build() +end diff --git a/tests/projects/c/headeronly/xmake.lua b/tests/projects/c/headeronly/xmake.lua new file mode 100644 index 000000000..d43bdceda --- /dev/null +++ b/tests/projects/c/headeronly/xmake.lua @@ -0,0 +1,9 @@ +add_rules("mode.release", "mode.debug") + +target("foo") + set_kind("headeronly") + add_headerfiles("src/foo.h") + add_rules("utils.install.cmake_importfiles") + add_rules("utils.install.pkgconfig_importfiles") + + |
