From 18ddd6bc123ed5f8fd41f3bf8f04388ec4cfb1e0 Mon Sep 17 00:00:00 2001 From: lingyunli63 Date: Sat, 1 Aug 2020 10:08:42 +0800 Subject: [PATCH] fix illegal instruction --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 136cd43..6f5c0d4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,7 @@ if(NOT SUPPORT_CXX11) endif() check_cxx_compiler_flag("-march=native" NATIVE_BUILD) -if(NATIVE_BUILD) +if(NATIVE_BUILD AND ENABLE_NATIVE_BUILD) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -march=native") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") endif() -- GitLab