Commit 93ef27ae authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #14920 from StefanBruens:fix_arm_on_aarch64_detection

parents 8937e875 e10c0104
...@@ -83,6 +83,7 @@ if(WIN32 AND CV_GCC) ...@@ -83,6 +83,7 @@ if(WIN32 AND CV_GCC)
endif() endif()
endif() endif()
message(STATUS "Detected processor: ${CMAKE_SYSTEM_PROCESSOR}")
if(MSVC64 OR MINGW64) if(MSVC64 OR MINGW64)
set(X86_64 1) set(X86_64 1)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING)) elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
...@@ -101,11 +102,17 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64") ...@@ -101,11 +102,17 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(powerpc|ppc)64")
set(PPC64 1) set(PPC64 1)
endif() endif()
# Workaround for 32-bit operating systems on 64-bit x86_64 processor # Workaround for 32-bit operating systems on x86_64/aarch64 processor
if(X86_64 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64) if(CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
message(STATUS "sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation mode (X86=1)") message(STATUS "sizeof(void) = 4 on 64 bit processor. Assume 32-bit compilation mode")
if (X86_64)
unset(X86_64) unset(X86_64)
set(X86 1) set(X86 1)
endif()
if (AARCH64)
unset(AARCH64)
set(ARM 1)
endif()
endif() endif()
# Similar code exists in OpenCVConfig.cmake # Similar code exists in OpenCVConfig.cmake
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment