From f17aeebbcdea957e7c22458019e15ae354ce6a4e Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Tue, 5 Oct 2021 22:31:39 -0400 Subject: [PATCH] make compilable on windows --- src/KOKKOS/kokkos.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/KOKKOS/kokkos.cpp b/src/KOKKOS/kokkos.cpp index be32604f94..63a18ec387 100644 --- a/src/KOKKOS/kokkos.cpp +++ b/src/KOKKOS/kokkos.cpp @@ -23,7 +23,15 @@ #include #include #include -#include + +#if defined(_WIN32) +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif +#include // for _getpid() +#else +#include // for getpid() +#endif #ifdef LMP_KOKKOS_GPU @@ -591,6 +599,10 @@ int KokkosLMP::neigh_count(int m) void KokkosLMP::my_signal_handler(int sig) { if (sig == SIGSEGV) { +#if defined(_WIN32) + kill(_getpid(),SIGABRT); +#else kill(getpid(),SIGABRT); +#endif } }