make compilable on windows
This commit is contained in:
@ -23,7 +23,15 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <cctype>
|
#include <cctype>
|
||||||
#include <csignal>
|
#include <csignal>
|
||||||
#include <unistd.h>
|
|
||||||
|
#if defined(_WIN32)
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
|
#include <windows.h> // for _getpid()
|
||||||
|
#else
|
||||||
|
#include <unistd.h> // for getpid()
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef LMP_KOKKOS_GPU
|
#ifdef LMP_KOKKOS_GPU
|
||||||
|
|
||||||
@ -591,6 +599,10 @@ int KokkosLMP::neigh_count(int m)
|
|||||||
void KokkosLMP::my_signal_handler(int sig)
|
void KokkosLMP::my_signal_handler(int sig)
|
||||||
{
|
{
|
||||||
if (sig == SIGSEGV) {
|
if (sig == SIGSEGV) {
|
||||||
|
#if defined(_WIN32)
|
||||||
|
kill(_getpid(),SIGABRT);
|
||||||
|
#else
|
||||||
kill(getpid(),SIGABRT);
|
kill(getpid(),SIGABRT);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user