excludes std::abort from compilation when compiling CUDA with Clang as device code
This commit is contained in:
parent
d59751f0f0
commit
aa3e6e69b4
@ -15,6 +15,7 @@
|
||||
#include <cstdarg>
|
||||
#include <cstring> // for std::memmove
|
||||
#include <cwchar>
|
||||
#include <exception>
|
||||
|
||||
#include "format.h"
|
||||
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
|
||||
@ -47,7 +48,11 @@ namespace internal {
|
||||
|
||||
FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
|
||||
print(stderr, "{}:{}: assertion failed: {}", file, line, message);
|
||||
#if defined(__clang__) && defined(__CUDA__) && defined(__CUDA_ARCH__)
|
||||
std::terminate();
|
||||
#else
|
||||
std::abort();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifndef _MSC_VER
|
||||
|
||||
Loading…
Reference in New Issue
Block a user