Merge pull request #5462 from alalek:fix_x86_detection

pull/5467/head
Alexander Alekhin 9 years ago
commit ea535abd50
  1. 6
      cmake/OpenCVDetectCXXCompiler.cmake

@ -116,6 +116,12 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set(AARCH64 1)
endif()
# Workaround for 32-bit operating systems on 64-bit x86_64 processor
if(X86_64 AND 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)")
unset(X86_64)
set(X86 1)
endif()
# Similar code exists in OpenCVConfig.cmake
if(NOT DEFINED OpenCV_STATIC)

Loading…
Cancel
Save