summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorstar-hengxing <[email protected]>2022-11-03 20:05:00 +0800
committerstar-hengxing <[email protected]>2022-11-03 20:05:00 +0800
commitf3e2f3cda0372e4d64c2aa83b1fd5c101e349417 (patch)
tree5bc753bc80b0c024cc3b33dcb197a2e8ca5a73ec /tests
parent60b8a7e7b06b4f964c07a8e784832883c3073a83 (diff)
add ispc
Diffstat (limited to 'tests')
-rw-r--r--tests/projects/other/ispc/.gitignore8
-rw-r--r--tests/projects/other/ispc/src/main.cpp8
-rw-r--r--tests/projects/other/ispc/src/test.ispc1
-rw-r--r--tests/projects/other/ispc/xmake.lua16
4 files changed, 33 insertions, 0 deletions
diff --git a/tests/projects/other/ispc/.gitignore b/tests/projects/other/ispc/.gitignore
new file mode 100644
index 000000000..152105761
--- /dev/null
+++ b/tests/projects/other/ispc/.gitignore
@@ -0,0 +1,8 @@
+# Xmake cache
+.xmake/
+build/
+
+# MacOS Cache
+.DS_Store
+
+
diff --git a/tests/projects/other/ispc/src/main.cpp b/tests/projects/other/ispc/src/main.cpp
new file mode 100644
index 000000000..4694c47c5
--- /dev/null
+++ b/tests/projects/other/ispc/src/main.cpp
@@ -0,0 +1,8 @@
+#include "test_ispc.h"
+
+using namespace ispc;
+
+int main(int argc, char *argv[])
+{
+ test_ispc();
+}
diff --git a/tests/projects/other/ispc/src/test.ispc b/tests/projects/other/ispc/src/test.ispc
new file mode 100644
index 000000000..64506d6ef
--- /dev/null
+++ b/tests/projects/other/ispc/src/test.ispc
@@ -0,0 +1 @@
+export void test_ispc() {} \ No newline at end of file
diff --git a/tests/projects/other/ispc/xmake.lua b/tests/projects/other/ispc/xmake.lua
new file mode 100644
index 000000000..a7311abec
--- /dev/null
+++ b/tests/projects/other/ispc/xmake.lua
@@ -0,0 +1,16 @@
+add_rules("mode.debug", "mode.release")
+
+includes("ispc.lua")
+
+target("test_ispc")
+ set_kind("object")
+ add_rules("utils.ispc", {header_extension = "_ispc.h"})
+ add_files("src/*.ispc")
+ set_values("ispc.flags", "--target=host")
+ set_policy("build.across_targets_in_parallel", false)
+
+target("test")
+ set_kind("binary")
+ add_deps("test_ispc")
+ add_files("src/*.cpp")
+