diff --git a/CMakeLists.txt b/CMakeLists.txt index 33296910..ce71604c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,6 +166,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "(Apple)?Clang" STREQUAL "x86") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -mfpmath=sse") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -mfpmath=sse") + + add_cxx_flag_if_supported(-frounding-math) endif() else() set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D__SSE__") diff --git a/test_common/harness/rounding_mode.h b/test_common/harness/rounding_mode.h index 8c0e8a13..abbb5afe 100644 --- a/test_common/harness/rounding_mode.h +++ b/test_common/harness/rounding_mode.h @@ -16,6 +16,8 @@ #ifndef __ROUNDING_MODE_H__ #define __ROUNDING_MODE_H__ +#pragma STDC FENV_ACCESS ON + #include "compat.h" #if (defined(_WIN32) && defined (_MSC_VER)) diff --git a/test_conformance/conversions/test_conversions.cpp b/test_conformance/conversions/test_conversions.cpp index b7280b4f..db5491fd 100644 --- a/test_conformance/conversions/test_conversions.cpp +++ b/test_conformance/conversions/test_conversions.cpp @@ -50,8 +50,6 @@ #include "Sleep.h" #include "basic_test_conversions.h" -#pragma STDC FENV_ACCESS ON - #if (defined(_WIN32) && defined (_MSC_VER)) // need for _controlfp_s and rouinding modes in RoundingMode #include "harness/testHarness.h"