From afdd756e56e0cffb7ac5681749abdba6aa089309 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 19 Jan 2017 14:48:43 +0100 Subject: Cycles: Don't use fast math for the host code This is important for the reliable behavior or isnan/isfinite/min/max functions to work with nan and non-finite values. Some of the issues with fast math are possible to work around, but didn't find a way to have reliable min/max implementation yet. --- intern/cycles/CMakeLists.txt | 2 -- 1 file changed, 2 deletions(-) (limited to 'intern/cycles/CMakeLists.txt') diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index 97854a88e84..79c1c3e3e82 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -74,7 +74,6 @@ elseif(CMAKE_COMPILER_IS_GNUCC) if(CXX_HAS_AVX2) set(CYCLES_AVX2_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c -mfpmath=sse") endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") check_cxx_compiler_flag(-msse CXX_HAS_SSE) check_cxx_compiler_flag(-mavx CXX_HAS_AVX) @@ -90,7 +89,6 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang") if(CXX_HAS_AVX2) set(CYCLES_AVX2_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -msse4.1 -mavx -mavx2 -mfma -mlzcnt -mbmi -mbmi2 -mf16c") endif() - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffast-math") endif() if(CXX_HAS_SSE) -- cgit v1.2.3