summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/projects/openmp/hello/src/main.c11
-rw-r--r--tests/projects/openmp/hello/xmake.lua3
2 files changed, 14 insertions, 0 deletions
diff --git a/tests/projects/openmp/hello/src/main.c b/tests/projects/openmp/hello/src/main.c
new file mode 100644
index 000000000..cea215566
--- /dev/null
+++ b/tests/projects/openmp/hello/src/main.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+#include <omp.h>
+
+int main(int argc, char** argv)
+{
+ #pragma omp parallel
+ {
+ printf("hello %d\n", omp_get_thread_num());
+ }
+ return 0;
+}
diff --git a/tests/projects/openmp/hello/xmake.lua b/tests/projects/openmp/hello/xmake.lua
new file mode 100644
index 000000000..685a6a34b
--- /dev/null
+++ b/tests/projects/openmp/hello/xmake.lua
@@ -0,0 +1,3 @@
+target("hello")
+ set_kind("binary")
+ add_files("src/*.c")