Exclude std::abort from compilation when compiling CUDA with Clang (#1661)
This commit is contained in:
parent
7b66e2f219
commit
7e57cace5d
@ -15,6 +15,7 @@
|
|||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <cstring> // for std::memmove
|
#include <cstring> // for std::memmove
|
||||||
#include <cwchar>
|
#include <cwchar>
|
||||||
|
#include <exception>
|
||||||
|
|
||||||
#include "format.h"
|
#include "format.h"
|
||||||
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
|
#if !defined(FMT_STATIC_THOUSANDS_SEPARATOR)
|
||||||
@ -47,7 +48,9 @@ namespace internal {
|
|||||||
|
|
||||||
FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
|
FMT_FUNC void assert_fail(const char* file, int line, const char* message) {
|
||||||
print(stderr, "{}:{}: assertion failed: {}", file, line, message);
|
print(stderr, "{}:{}: assertion failed: {}", file, line, message);
|
||||||
std::abort();
|
// Chosen instead of std::abort to satisfy Clang in CUDA mode during device
|
||||||
|
// code pass.
|
||||||
|
std::terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
|
Loading…
Reference in New Issue
Block a user