summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2021-11-12 21:31:34 -0600
committerTimothy Pearson <tpearson@raptorengineering.com>2021-11-12 21:31:34 -0600
commitf783c7edba0b186e55a47ce9e00a90c92804b2a5 (patch)
tree8ecc200b4351c0e39ab4f2fd6a50b9a41df84733
parent006da4e87290c32531dcde4c1666f53e10368368 (diff)
Add support for POWER architecture
-rw-r--r--cmake/Modules/DetectArchitecture.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/Modules/DetectArchitecture.cmake b/cmake/Modules/DetectArchitecture.cmake
index f2d11ffbe..73eecef96 100644
--- a/cmake/Modules/DetectArchitecture.cmake
+++ b/cmake/Modules/DetectArchitecture.cmake
@@ -103,6 +103,7 @@ else()
detect_architecture("__i386__" x86)
detect_architecture("__arm__" ARM)
detect_architecture("__aarch64__" ARM64)
+ detect_architecture("__PPC64__" PPC64)
endif()
if (NOT DEFINED ARCHITECTURE)
message(FATAL_ERROR "Not supported. Please add needed architecture detection.")
@@ -172,6 +173,9 @@ if (ARCH_OPT)
if(MSVC AND NOT MARCH_NATIVE_SUPPORTED)
set(CMAKE_REQUIRED_FLAGS "/arch:${ARCH_OPT}")
add_compile_options(${CMAKE_REQUIRED_FLAGS})
+ elseif (ARCHITECTURE_PPC64)
+ set(CMAKE_REQUIRED_FLAGS "-mcpu=${ARCH_OPT}")
+ add_compile_options(-mcpu=${ARCH_OPT})
else()
set(CMAKE_REQUIRED_FLAGS "-march=${ARCH_OPT}")
add_compile_options(-march=${ARCH_OPT})