Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ppc and ppc64 to CMakeLists #385

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ else()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
set(APP_ARCH "arm64")
endif()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc")
set(APP_ARCH "ppc")
endif()
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "ppc64")
set(APP_ARCH "ppc64")
endif()
if("${APP_ARCH}" STREQUAL "")
message(FATAL_ERROR "Architecture not supported")
endif()
Expand Down Expand Up @@ -77,6 +83,22 @@ elseif("${APP_ARCH}" STREQUAL "i386")
add_definitions(-DDISABLEAVX)
add_definitions(-DDISABLE_EMBEDDED_ASM)
message("i386 CXXFLAGS ${CMAKE_CXX_FLAGS_RELEASE}")
elseif("${APP_ARCH}" STREQUAL "ppc")
# This work on ppc
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -Wall -Werror -ffast-math -funroll-loops -O3 -std=c++11")
set(CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} -Wall -Werror -ffast-math -funroll-loops -O3 -std=c99")
add_definitions(-DDISABLE_EMBEDDED_ASM)
message("ppc CXXFLAGS ${CMAKE_CXX_FLAGS_RELEASE}")
elseif("${APP_ARCH}" STREQUAL "ppc64")
# This work on ppc64
set(CMAKE_CXX_FLAGS_RELEASE
"${CMAKE_CXX_FLAGS_RELEASE} -Wall -Werror -ffast-math -funroll-loops -O3 -std=c++11")
set(CMAKE_C_FLAGS_RELEASE
"${CMAKE_C_FLAGS_RELEASE} -Wall -Werror -ffast-math -funroll-loops -O3 -std=c99")
add_definitions(-DDISABLE_EMBEDDED_ASM)
message("ppc64 CXXFLAGS ${CMAKE_CXX_FLAGS_RELEASE}")
elseif("${APP_ARCH}" STREQUAL "arm64")
# This work on arm
set(CMAKE_CXX_FLAGS_RELEASE
Expand Down