Disable finite-math-only option with ENABLE_FAST_MATH=1 case to handle NaN and Inf checks correctly.

This commit is contained in:
Alexander Smorkalov 2023-07-05 16:08:33 +03:00
parent b8e3bc9dd8
commit 2d92f42878

View File

@ -108,6 +108,7 @@ elseif(CV_ICC)
elseif(CV_GCC OR CV_CLANG) elseif(CV_GCC OR CV_CLANG)
if(ENABLE_FAST_MATH) if(ENABLE_FAST_MATH)
add_extra_compiler_option(-ffast-math) add_extra_compiler_option(-ffast-math)
add_extra_compiler_option(-fno-finite-math-only)
endif() endif()
endif() endif()