From a4adc28b0b5f601928887863effe7d808f467e33 Mon Sep 17 00:00:00 2001 From: Volker Grabsch Date: Sun, 9 May 2010 23:16:22 +0200 Subject: add test program for package libgomp (by Tony Theodore) --- src/libgomp-test.c | 17 +++++++++++++++++ src/libgomp.mk | 5 +++++ 2 files changed, 22 insertions(+) create mode 100644 src/libgomp-test.c diff --git a/src/libgomp-test.c b/src/libgomp-test.c new file mode 100644 index 0000000..fbf304d --- /dev/null +++ b/src/libgomp-test.c @@ -0,0 +1,17 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include +#include + +int main(int argc, char* argv[]) +{ + (void)argc; + (void)argv; + + #pragma omp parallel + printf("Hello from thread %d, nthreads %d\n", + omp_get_thread_num(), omp_get_num_threads()); + + return 0; +} diff --git a/src/libgomp.mk b/src/libgomp.mk index 997de0e..4206864 100644 --- a/src/libgomp.mk +++ b/src/libgomp.mk @@ -28,4 +28,9 @@ define $(PKG)_BUILD --disable-shared \ LIBS='-lws2_32' $(MAKE) -C '$(1)/build/$(TARGET)/libgomp' -j '$(JOBS)' install + + '$(TARGET)-gcc' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-libgomp.exe' \ + -fopenmp endef -- cgit v0.12