Skip to content

Commit

Permalink
Architecture detection fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nemothenoone committed Aug 4, 2022
1 parent 3773e0d commit 4ed23a2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmake/TargetArchitecture.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#---------------------------------------------------------------------------#
# Copyright (c) 2018-2020 Mikhail Komarov <[email protected]>
#
# Distributed under the Boost Software License, Version 1.0
# See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt
#---------------------------------------------------------------------------#

# https://qt.gitorious.org/qt/qtbase/blobs/master/src/corelib/global/qprocessordetection.h
# Currently handles arm (v5, v6, v7), x86 (32/64), ia64, and ppc (32/64)

Expand Down Expand Up @@ -107,6 +101,8 @@ function(target_architecture OUTPUT_ARCHITECTURE)
set(osx_arch_i386 TRUE)
elseif("${osx_arch}" STREQUAL "x86_64")
set(osx_arch_x86_64 TRUE)
elseif("${osx_arch}" STREQUAL "arm64")
set(osx_arch_arm64 TRUE)
elseif("${osx_arch}" STREQUAL "ppc64" AND ppc_support)
set(osx_arch_ppc64 TRUE)
else()
Expand All @@ -130,6 +126,10 @@ function(target_architecture OUTPUT_ARCHITECTURE)
if(osx_arch_ppc64)
list(APPEND ARCH ppc64)
endif()

if(osx_arch_ppc64)
list(APPEND ARCH arm64)
endif()
else()
file(WRITE "${CMAKE_BINARY_DIR}/arch.c" "${archdetect_c_code}")

Expand Down

0 comments on commit 4ed23a2

Please sign in to comment.