From c00276a76146997bc6946106d8bc6c814d5a6257 Mon Sep 17 00:00:00 2001 From: Username404 Date: Fri, 31 Dec 2021 13:04:57 +0100 Subject: [PATCH] Add "-fno-math-errno" to the release flags for GNU and Clang compilers Signed-off-by: Username404 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a2bd15..a65d968 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ if (${IS_GNU} OR ${IS_CLANG}) endif() endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstrict-enums -pipe -fstack-protector-strong -fstack-clash-protection -funwind-tables -fasynchronous-unwind-tables -frtti -fexceptions") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fmerge-all-constants -ftree-vectorize") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -ffunction-sections -fdata-sections -fmerge-all-constants -ftree-vectorize -fno-math-errno") include(CheckCXXCompilerFlag) set(CF_PROTECTION "-fcf-protection") check_cxx_compiler_flag("${CF_PROTECTION}" CF_PROTECTION_SUPPORTED)