Hardcode iOS's endianness, since the TestBigEndian module doesn't work there
authorRoman Donchenko <roman.donchenko@itseez.com>
Fri, 21 Feb 2014 12:08:49 +0000 (16:08 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Mon, 24 Feb 2014 08:13:35 +0000 (12:13 +0400)
CMakeLists.txt

index b5fbb9f..fb49497 100644 (file)
@@ -448,8 +448,15 @@ include(cmake/OpenCVModule.cmake)
 # ----------------------------------------------------------------------------
 #  Detect endianness of build platform
 # ----------------------------------------------------------------------------
-include(TestBigEndian)
-test_big_endian(WORDS_BIGENDIAN)
+
+if(CMAKE_SYSTEM_NAME STREQUAL iOS)
+  # test_big_endian needs try_compile, which doesn't work for iOS
+  # http://public.kitware.com/Bug/view.php?id=12288
+  set(WORDS_BIGENDIAN 0)
+else()
+  include(TestBigEndian)
+  test_big_endian(WORDS_BIGENDIAN)
+endif()
 
 # ----------------------------------------------------------------------------
 #  Detect 3rd-party libraries