aboutsummaryrefslogtreecommitdiff
path: root/cmake/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/scripts')
-rw-r--r--cmake/scripts/android/ArchSetup.cmake1
-rw-r--r--cmake/scripts/common/ArchSetup.cmake5
-rw-r--r--cmake/scripts/ios/ArchSetup.cmake2
-rw-r--r--cmake/scripts/linux/ArchSetup.cmake2
4 files changed, 7 insertions, 3 deletions
diff --git a/cmake/scripts/android/ArchSetup.cmake b/cmake/scripts/android/ArchSetup.cmake
index fe7d4c1583..17215a7aad 100644
--- a/cmake/scripts/android/ArchSetup.cmake
+++ b/cmake/scripts/android/ArchSetup.cmake
@@ -17,6 +17,7 @@ else()
set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad")
elseif(CPU STREQUAL arm64-v8a)
set(ARCH aarch64)
+ set(NEON True)
elseif(CPU STREQUAL i686)
set(ARCH i486-linux)
set(NEON False)
diff --git a/cmake/scripts/common/ArchSetup.cmake b/cmake/scripts/common/ArchSetup.cmake
index 74afc8ccaf..8d5dba8bbe 100644
--- a/cmake/scripts/common/ArchSetup.cmake
+++ b/cmake/scripts/common/ArchSetup.cmake
@@ -146,7 +146,10 @@ if(NOT DEFINED NEON OR NEON)
option(ENABLE_NEON "Enable NEON optimization" ${NEON})
if(ENABLE_NEON)
message(STATUS "NEON optimization enabled")
- add_options(ALL_LANGUAGES ALL_BUILDS ${NEON_FLAGS})
+ add_definitions(-DHAS_NEON)
+ if(NEON_FLAGS)
+ add_options(ALL_LANGUAGES ALL_BUILDS ${NEON_FLAGS})
+ endif()
endif()
endif()
diff --git a/cmake/scripts/ios/ArchSetup.cmake b/cmake/scripts/ios/ArchSetup.cmake
index dbb7c4858e..20d8cd20ee 100644
--- a/cmake/scripts/ios/ArchSetup.cmake
+++ b/cmake/scripts/ios/ArchSetup.cmake
@@ -15,7 +15,7 @@ else()
if(CPU STREQUAL armv7 OR CPU STREQUAL arm64)
set(CMAKE_OSX_ARCHITECTURES ${CPU})
set(ARCH arm-osx)
- set(NEON False)
+ set(NEON True)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()
diff --git a/cmake/scripts/linux/ArchSetup.cmake b/cmake/scripts/linux/ArchSetup.cmake
index eeed920aff..53e5f1bd12 100644
--- a/cmake/scripts/linux/ArchSetup.cmake
+++ b/cmake/scripts/linux/ArchSetup.cmake
@@ -19,7 +19,7 @@ else()
set(NEON_FLAGS "-mfpu=neon -mvectorize-with-neon-quad")
elseif(CPU MATCHES aarch64 OR CPU MATCHES arm64)
set(ARCH aarch64)
- set(NEON False)
+ set(NEON True)
else()
message(SEND_ERROR "Unknown CPU: ${CPU}")
endif()