mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-18 11:28:51 +08:00
Enable less FP exceptions for clang compiler when running tesseract
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
c39b1daa6b
commit
fe614c6069
@ -622,7 +622,12 @@ static void PreloadRenderers(
|
|||||||
int main(int argc, char** argv) {
|
int main(int argc, char** argv) {
|
||||||
#if defined(__USE_GNU)
|
#if defined(__USE_GNU)
|
||||||
// Raise SIGFPE.
|
// Raise SIGFPE.
|
||||||
|
#if defined(__clang__)
|
||||||
|
// clang creates code which causes some FP exceptions, so don't enable those.
|
||||||
|
feenableexcept(FE_DIVBYZERO);
|
||||||
|
#else
|
||||||
feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID);
|
feenableexcept(FE_DIVBYZERO | FE_OVERFLOW | FE_INVALID);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
const char* lang = nullptr;
|
const char* lang = nullptr;
|
||||||
const char* image = nullptr;
|
const char* image = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user