aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/common/184 openmp/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/common/184 openmp/main.cpp')
-rw-r--r--meson/test cases/common/184 openmp/main.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/meson/test cases/common/184 openmp/main.cpp b/meson/test cases/common/184 openmp/main.cpp
new file mode 100644
index 000000000..b12be3fd8
--- /dev/null
+++ b/meson/test cases/common/184 openmp/main.cpp
@@ -0,0 +1,16 @@
+#include <iostream>
+#include <omp.h>
+
+int main(void) {
+#ifdef _OPENMP
+ if (omp_get_max_threads() == 2) {
+ return 0;
+ } else {
+ std::cout << "Max threads is " << omp_get_max_threads() << " not 2." << std::endl;
+ return 1;
+ }
+#else
+ printf("_OPENMP is not defined; is OpenMP compilation working?\n");
+ return 1;
+#endif
+}