Cycles: attempted fix for error building with sse/mtune optimization flags.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 10 Nov 2011 14:13:32 +0000 (14:13 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 10 Nov 2011 14:13:32 +0000 (14:13 +0000)
intern/cycles/CMakeLists.txt
intern/cycles/SConscript

index 86fb6e49e33411a7bd9902d80433deddc0ca309b..c0992aae7da7cba9a0f87fa9f8c551440b52cc6f 100644 (file)
@@ -8,7 +8,9 @@ include(cmake/external_libs.cmake)
 
 # Build Flags
 
-set(GCC_OPTIM_FLAGS "-ffast-math -msse -msse2 -msse3 -mtune=native")
+if(WITH_RAYOPTIMIZATION AND SUPPORT_SSE_BUILD)
+       set(GCC_OPTIM_FLAGS "-ffast-math -msse -msse2 -msse3")
+endif()
 
 if(APPLE)
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_OPTIM_FLAGS}")
index 27943ed6ac6ab5e67d1ee8114e1d0587051bc494..5ecd52d369f4a75fa9a05aee4663ac450e8d85ea 100644 (file)
@@ -24,10 +24,12 @@ defs.append('WITH_MULTI')
 defs.append('WITH_CUDA')
 
 if env['OURPLATFORM'] in ('win32-mingw'):
-    cxxflags.append('-fno-rtti -ffast-math -msse -msse2 -msse3 -mtune=native'.split())
-    ccflags.append('-ffast-math -msse -msse2 -msse3 -mtune=native'.split())
+    cxxflags.append('-fno-rtti'.split())
+    if env['WITH_BF_RAYOPTIMIZATION']:
+        cxxflags.append('-ffast-math -msse -msse2 -msse3'.split())
+        ccflags.append('-ffast-math -msse -msse2 -msse3'.split())
     defs.append('BOOST_NO_RTTI BOOST_NO_TYPEID'.split())
-       
+
 incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
 incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna'.split())
 incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())