From 231d8dd2ba262ddda60e545886cccc0efc7e8e3e Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 22 Feb 2022 16:55:17 -0500 Subject: [PATCH] make OpenMP an optional dependency Fix #1491. --- source/lib/include/ewald.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/lib/include/ewald.h b/source/lib/include/ewald.h index bce151365a..654a6983e7 100644 --- a/source/lib/include/ewald.h +++ b/source/lib/include/ewald.h @@ -2,7 +2,12 @@ #include #include +#if defined(_OPENMP) #include +#else +int omp_get_num_threads() { return 1; } +int omp_get_thread_num() { return 0; } +#endif #include "utilities.h" #include "region.h"