Skip to content

Commit

Permalink
CMakeLists: add PowerPC defines
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 21, 2023
1 parent bd3b797 commit 4cdb0bb
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
#
# - Linux (Clang): aarch64
#
# - macOS 10.5, 10.6 (GCC): ppc, ppc64
#
# - Windows (Cygwin GCC, MingW32 GCC, Visual C++): x86, AMD64
#
# - Solaris (GCC and native compiler): sparc
Expand Down Expand Up @@ -334,6 +336,8 @@ if (APPLE)
unset(HAS__aarch64__DEFINED CACHE)
unset(HAS__i386_DEFINED CACHE)
unset(HAS__x86_64__DEFINED CACHE)
unset(HAS__ppc__DEFINED CACHE)
unset(HAS__ppc64__DEFINED CACHE)
endif()
endif (APPLE)

Expand All @@ -346,6 +350,7 @@ check_symbol_exists (__x86_64__ "" HAS__x86_64__DEFINED)
check_symbol_exists (__i386 "" HAS__i386_DEFINED)
check_symbol_exists (__aarch64__ "" HAS__aarch64__DEFINED)
check_symbol_exists (__ppc__ "" HAS__ppc__DEFINED)
check_symbol_exists (__ppc64__ "" HAS__ppc64__DEFINED)
check_symbol_exists (__powerpc "" HAS__powerpc_DEFINED)


Expand All @@ -362,6 +367,12 @@ if (NOT SystemC_TARGET_ARCH)
set (_TARGET_ARCH "macosarm64")
elseif (HAS__x86_64__DEFINED)
set (_TARGET_ARCH "macosx64")
elseif (HAS__ppc__DEFINED)
# Untested platform.
set (_TARGET_ARCH "macosppc")
elseif (HAS__ppc64__DEFINED)
# Untested platform.
set (_TARGET_ARCH "macosppc64")
else (N_OSX_ARCHITECTURES GREATER 1)
set (_TARGET_ARCH "macosunknown")
endif (N_OSX_ARCHITECTURES GREATER 1)
Expand Down

0 comments on commit 4cdb0bb

Please sign in to comment.