From 51ff4435217ea5e8400369e3bead2b330a60e62e Mon Sep 17 00:00:00 2001 From: kaetemi Date: Fri, 20 Jun 2014 19:46:33 +0200 Subject: [PATCH] Add option for -mfpmath=both flag --- code/CMakeModules/nel.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index 2d7632aa8..dd8dee49f 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -327,6 +327,10 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) OPTION(WITH_SSE2 "With SSE2" ON ) OPTION(WITH_SSE3 "With SSE3" ON ) + + IF(NOT MSVC) + OPTION(WITH_GCC_FPMATH_BOTH "With GCC -mfpmath=both" OFF) + ENDIF(NOT MSVC) ENDMACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) MACRO(NL_SETUP_NELNS_DEFAULT_OPTIONS) @@ -621,6 +625,10 @@ MACRO(NL_SETUP_BUILD) ADD_PLATFORM_FLAGS("-msse3") ENDIF(WITH_SSE3) + IF(WITH_GCC_FPMATH_BOTH) + ADD_PLATFORM_FLAGS("-mfpmath=both") + ENDIF(WITH_GCC_FPMATH_BOTH) + IF(APPLE) IF(NOT XCODE) IF(CMAKE_OSX_ARCHITECTURES)