From 46758efc8fc69d08e89a84f5657249948986e637 Mon Sep 17 00:00:00 2001 From: Quantum Date: Sun, 21 Feb 2021 15:13:40 -0500 Subject: [PATCH] [client] cmake: build for nehalem when OPTIMIZE_FOR_NATIVE=NO We need SSE intrinsics like _mm_stream_load_si128 which is only available on CPUs of nehalem or newer. --- client/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 2026b5c6..f3ecb753 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -13,6 +13,8 @@ if(OPTIMIZE_FOR_NATIVE) if(COMPILER_SUPPORTS_MARCH_NATIVE) add_compile_options("-march=native") endif() +else() + add_compile_options("-march=nehalem" "-mtune=generic") endif() option(ENABLE_OPENGL "Enable the OpenGL renderer" ON)