From 988d3a1a0d0bff2d1ddeca461d9f4f09bdea6692 Mon Sep 17 00:00:00 2001 From: Ingo Weyrich Date: Thu, 7 May 2020 15:26:10 +0200 Subject: [PATCH] Do not set math errno --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3ae3b7ff..532353a8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -128,6 +128,9 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${PROC_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=unused-label") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=delete-incomplete") +# Do net set math errno, as we never check its value. +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-math-errno") + # Special treatment for x87 and x86-32 SSE (see GitHub issue #4324) include(FindX87Math) if(HAVE_X87_MATH)