[Orxonox-commit 2822] r7525 - code/branches/ois_update/src
rgrieder at orxonox.net
rgrieder at orxonox.net
Mon Oct 11 23:08:26 CEST 2010
Author: rgrieder
Date: 2010-10-11 23:08:26 +0200 (Mon, 11 Oct 2010)
New Revision: 7525
Modified:
code/branches/ois_update/src/OrxonoxConfig.cmake
code/branches/ois_update/src/OrxonoxConfig.h.in
Log:
Architecture (32/64 bit) should be determined at compile time because the CMake variable is not reliable (nor is it well possible to do for CMake).
We should still treat this carefully: You can build universal binaries on OS X with both 32 and 64 bit support (sounds like a nightmare for hardware-near development...).
Modified: code/branches/ois_update/src/OrxonoxConfig.cmake
===================================================================
--- code/branches/ois_update/src/OrxonoxConfig.cmake 2010-10-11 20:39:58 UTC (rev 7524)
+++ code/branches/ois_update/src/OrxonoxConfig.cmake 2010-10-11 21:08:26 UTC (rev 7525)
@@ -52,13 +52,6 @@
SET(ORXONOX_LITTLE_ENDIAN TRUE)
ENDIF()
-# 32/64 bit system check
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(ORXONOX_ARCH_64 TRUE)
-ELSE()
- SET(ORXONOX_ARCH_32 TRUE)
-ENDIF()
-
# Platforms
SET(ORXONOX_PLATFORM_WINDOWS ${WIN32})
SET(ORXONOX_PLATFORM_APPLE ${APPLE})
Modified: code/branches/ois_update/src/OrxonoxConfig.h.in
===================================================================
--- code/branches/ois_update/src/OrxonoxConfig.h.in 2010-10-11 20:39:58 UTC (rev 7524)
+++ code/branches/ois_update/src/OrxonoxConfig.h.in 2010-10-11 21:08:26 UTC (rev 7525)
@@ -79,8 +79,11 @@
#cmakedefine ORXONOX_LITTLE_ENDIAN
// Architecture
-#cmakedefine ORXONOX_ARCH_32
-#cmakedefine ORXONOX_ARCH_64
+#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
+# define ORXONOX_ARCH_64
+#else
+# define ORXONOX_ARCH_32
+#endif
// See if we can use __forceinline or if we need to use __inline instead
#cmakedefine HAVE_FORCEINLINE
More information about the Orxonox-commit
mailing list