Skip to content

Commit 08fde5e

Browse files
committed
Use 64bit build on CMAKE_SYSTEM_PROCESSOR=i386 on Darwin
Here a bit tricky things. A value `CMAKE_SYSTEM_PROCESSOR` is came from output of `uname -m` which migth be 32bit with 64bit building applicaiton. So, for that case use `CMAKE_SIZEOF_VOID_P` to detect the target. See https://trac.macports.org/ticket/68488
1 parent 39bf8ec commit 08fde5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/system_check.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "loongarch64.*")
4646
set(LOONGARCH64 1)
4747
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "riscv64.*")
4848
set(RISCV64 1)
49-
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
49+
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*" OR (CMAKE_SYSTEM_NAME MATCHES "Darwin" AND CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*"))
5050
if (NOT BINARY)
5151
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
5252
set(X86_64 1)

0 commit comments

Comments
 (0)