depot/third_party/nixpkgs/pkgs/development/libraries/x265/fix-neon-detection.patch
Default email eeb71630af Project import generated by Copybara.
GitOrigin-RevId: 636051e353461f073ac55d5d42c1ed062a345046
2022-11-02 23:02:43 +01:00

28 lines
960 B
Diff

commit 72489cd0a1c229258abe4f20e4fdfd414dfa88da
Author: rnhmjoj <rnhmjoj@inventati.org>
Date: Sun Oct 2 00:15:24 2022 +0200
Fix NEON detection
diff --git a/cmake/FindNeon.cmake b/cmake/FindNeon.cmake
index 0062449..9c436d9 100644
--- a/cmake/FindNeon.cmake
+++ b/cmake/FindNeon.cmake
@@ -1,10 +1,11 @@
include(FindPackageHandleStandardArgs)
# Check the version of neon supported by the ARM CPU
-execute_process(COMMAND cat /proc/cpuinfo | grep Features | grep neon
- OUTPUT_VARIABLE neon_version
- ERROR_QUIET
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-if(neon_version)
- set(CPU_HAS_NEON 1)
+message(STATUS "Detecting NEON support")
+execute_process(COMMAND sed -n "/Features.* neon/q 1" /proc/cpuinfo
+ RESULT_VARIABLE CPU_HAS_NEON)
+if(CPU_HAS_NEON)
+ message(STATUS "Detecting NEON support - supported")
+else()
+ message(STATUS "Detecting NEON support - not supported" )
endif()