From 4b8430ae8aaab4374310e2f9a91aa253ec2f4ab2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 15 Oct 2014 14:53:12 +0600 Subject: CMake: Add a flag to explicitly disable SSE/SSE2 intrinsics The flag is called WITH_CPU_SSE, it is ON by default so no one should be affected by the change really. This should hopefully fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763755 --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 63dae899366..91a8a0420d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,6 +273,8 @@ option(WITH_PYTHON_INSTALL "Copy system python into the blender install fo option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder" ON) set(PYTHON_NUMPY_PATH "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module") mark_as_advanced(PYTHON_NUMPY_PATH) +option(WITH_CPU_SSE "Enable SIMD instruction if they're detected on the host machine" ON) +mark_as_advanced(WITH_CPU_SSE) if(UNIX AND NOT APPLE) option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON) @@ -568,7 +570,13 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS) set(WITH_GHOST_XDND OFF) endif() -TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG) +if(WITH_CPU_SSE) + TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG) +else() + message(STATUS "SSE and SSE2 optimizations are DISABLED!") + set(COMPILER_SSE_FLAG) + set(COMPILER_SSE2_FLAG) +endif() TEST_STDBOOL_SUPPORT() if(HAVE_STDBOOL_H) -- cgit v1.2.3