From 7c30d85536489863aa69a1d7694a83180be7df66 Mon Sep 17 00:00:00 2001 From: yagoda Date: Wed, 15 Feb 2017 11:47:45 +0000 Subject: [PATCH] fixing errors with compiler flags --- CMakeLists.txt | 9 ++++++++- cmake/modules/FindSSE.cmake | 5 ++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ae8e9c532..de2991136 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,7 +124,14 @@ if(CMAKE_COMPILER_IS_GNUCC) endif(${CMAKE_BUILD_TYPE} STREQUAL "Debug") - + IF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon -march=native -DIS_ARM -DHAVE_NEON") +message(STATUS "have ARM") +ELSE(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") +ENDIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm") + +set(CMAKE_REQUIRED_FLAGS ${CMAKE_C_FLAGS}) + if(NOT WIN32) ADD_CXX_COMPILER_FLAG_IF_AVAILABLE(-fvisibility=hidden HAVE_VISIBILITY_HIDDEN) endif(NOT WIN32) diff --git a/cmake/modules/FindSSE.cmake b/cmake/modules/FindSSE.cmake index 7b258f70f..959022fa7 100644 --- a/cmake/modules/FindSSE.cmake +++ b/cmake/modules/FindSSE.cmake @@ -1,3 +1,6 @@ +#if (NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|^i[3,9]86$") +# return() +#endif() include(CheckCSourceRuns) @@ -96,4 +99,4 @@ if (ENABLE_SSE) endif() -mark_as_advanced(HAVE_SSE, HAVE_AVX, HAVE_AVX2) \ No newline at end of file +mark_as_advanced(HAVE_SSE, HAVE_AVX, HAVE_AVX2)