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 <noel.eck@intel.com>
This commit is contained in:
Noel Eck 2017-05-09 11:28:20 -07:00
parent 6c383dbd42
commit c78da687d4

@ -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")