From c78da687d46291dd0a8ae3048a70ab852e55a058 Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Tue, 9 May 2017 11:28:20 -0700 Subject: [PATCH] CMakeLists.txt: Removed force to -march=native Setting the arch to native for arm.* should not generally be necessary. If this is absolutely required, it can be passed manually. Setting -march=native seems to fail on some versions of gnu gcc for arm. Removed the force to -march=native in favor of letting cmake set the arch. If at some point, this would be required, a better way would be to add the compile flag after testing if it is supported. Example: upm_add_compile_flags(CXX "-march=native") Signed-off-by: Noel Eck --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 07d00e5b..15a30fb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -236,11 +236,6 @@ include (TargetArch) target_architecture (DETECTED_ARCH) message (STATUS "Target arch is ${DETECTED_ARCH}") -#-march=native for ARM when not defined/forced -if (DETECTED_ARCH MATCHES "arm.*" AND NOT CMAKE_CXX_FLAGS MATCHES "-march") - set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native") -endif() - # enable c++11 standards support unconditionally include(CheckCXXCompilerFlag) if (CMAKE_VERSION VERSION_LESS "3.1")