From e55f42f2c0129d3037168aa62ab03b11d4360247 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 28 Oct 2016 18:47:54 +0800 Subject: [PATCH] cmake: drop "-march=native" from CXX_FLAGS this breaks the cross-compiling, and we can not assume that the building machine and the target machine share the same CPU spec. Signed-off-by: Kefu Chai --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c3a012f..9db7f96c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,7 +91,7 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W -Wextra -Wall -Werror") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-compare -Wshadow -Wno-unused-parameter -Wno-unused-variable -Woverloaded-virtual -Wnon-virtual-dtor -Wno-missing-field-initializers") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -fno-omit-frame-pointer -momit-leaf-frame-pointer") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -momit-leaf-frame-pointer") endif() option(WITH_ASAN "build with ASAN" OFF) -- 2.47.3