Mercurial > mxe-octave
changeset 945:5d47a5e4b43a
add test program for package libgomp (by Tony Theodore)
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 09 May 2010 23:16:22 +0200 |
parents | 26c10955389a |
children | 35a9e556c82c |
files | src/libgomp-test.c src/libgomp.mk |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/libgomp-test.c Sun May 09 23:16:22 2010 +0200 @@ -0,0 +1,17 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include <omp.h> +#include <stdio.h> + +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; +}
--- a/src/libgomp.mk Sun May 09 19:06:05 2010 +0200 +++ b/src/libgomp.mk Sun May 09 23:16:22 2010 +0200 @@ -28,4 +28,9 @@ --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