[x265] [PATCH] Fixed POWER CPU architecture detection

Peter Kovář peter.kovar at reflexion.tv
Sat Jul 18 11:52:14 CEST 2015


# HG changeset patch
# User Peter Kovář <peter.kovar at reflexion.tv>
# Date 1435919347 14400
#      Fri Jul 03 06:29:07 2015 -0400
# Node ID 83a5975cc5d4d632b6e3790bdb1a51990b33d6a1
# Parent  b2ba7df1fc6992516cfce36fac1ff4fc6bac1a5e
Fixed POWER CPU architecture detection

diff -r b2ba7df1fc69 -r 83a5975cc5d4 source/CMakeLists.txt
--- a/source/CMakeLists.txt	Thu Jul 16 19:36:35 2015 -0700
+++ b/source/CMakeLists.txt	Fri Jul 03 06:29:07 2015 -0400
@@ -42,6 +42,8 @@
 string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" SYSPROC)
 set(X86_ALIASES x86 i386 i686 x86_64 amd64)
 list(FIND X86_ALIASES "${SYSPROC}" X86MATCH)
+set(POWER_ALIASES ppc64 ppc64le)
+list(FIND POWER_ALIASES "${SYSPROC}" POWERMATCH)
 if("${SYSPROC}" STREQUAL "" OR X86MATCH GREATER "-1")
     message(STATUS "Detected x86 target processor")
     set(X86 1)
@@ -50,6 +52,10 @@
         set(X64 1)
         add_definitions(-DX86_64=1)
     endif()
+elseif(POWERMATCH GREATER "-1")
+    message(STATUS "Detected POWER target processor")
+    set(POWER 1)
+    add_definitions(-DX265_ARCH_POWER=1)
 elseif(${SYSPROC} STREQUAL "armv6l")
     message(STATUS "Detected ARM target processor")
     set(ARM 1)


More information about the x265-devel mailing list