summaryrefslogtreecommitdiff
path: root/indra/cmake/Variables.cmake
diff options
context:
space:
mode:
authorChristian Goetze <cg@lindenlab.com>2009-04-30 06:52:38 +0000
committerChristian Goetze <cg@lindenlab.com>2009-04-30 06:52:38 +0000
commit4bcbf3342284b19ff5fbda5a16a43a8cafb3baad (patch)
tree122215d08d5802a7ee1e0bf5c5f341715677898b /indra/cmake/Variables.cmake
parentd5aad9ebc33059b34d42595d03fa4cba6b16ca9b (diff)
svn merge -r118008:118374 svn+ssh://svn.lindenlab.com/svn/linden/branches/cg/viewer-etch-1
QAR-1459 etch builds enabled
Diffstat (limited to 'indra/cmake/Variables.cmake')
-rw-r--r--indra/cmake/Variables.cmake21
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 2fbd5a3fb8..c4dcc7eae7 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -45,12 +45,28 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
set(ARCH i686)
set(LL_ARCH ${ARCH}_win32)
set(LL_ARCH_DIR ${ARCH}-win32)
+ set(WORD_SIZE 32)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LINUX ON BOOl FORCE)
- execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
- OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+ # If someone has specified a word size, use that to determine the
+ # architecture. Otherwise, let the architecture specify the word size.
+ if (WORD_SIZE EQUAL 32)
+ set(ARCH i686)
+ elseif (WORD_SIZE EQUAL 64)
+ set(ARCH x86_64)
+ else (WORD_SIZE EQUAL 32)
+ execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/
+ OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if (ARCH STREQUAL x86_64)
+ set(WORD_SIZE 64)
+ else (ARCH STREQUAL x86_64)
+ set(WORD_SIZE 64)
+ endif (ARCH STREQUAL x86_64)
+ endif (WORD_SIZE EQUAL 32)
+
set(LL_ARCH ${ARCH}_linux)
set(LL_ARCH_DIR ${ARCH}-linux)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
@@ -73,6 +89,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif (CMAKE_OSX_ARCHITECTURES MATCHES "i386" AND CMAKE_OSX_ARCHITECTURES MATCHES "ppc")
set(LL_ARCH ${ARCH}_darwin)
set(LL_ARCH_DIR universal-darwin)
+ set(WORD_SIZE 32)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# Default deploy grid