summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorBoroondas Gupte <hg@boroon.dasgupta.ch>2010-09-16 13:35:07 +0200
committerBoroondas Gupte <hg@boroon.dasgupta.ch>2010-09-16 13:35:07 +0200
commit58c08f7c2cc33c4bf9ef688f0d4a87909ebb9250 (patch)
tree05a6a0d554c81db622f0606786138571661ebf53 /indra/cmake
parentea112188e258cd51856b767311ee7917c114413a (diff)
parent3ca4baeebc3fd3cd10faf27560237daae0b39547 (diff)
SNOW-512 FOLLOWUP merged VWR-20911 with SNOW-748
VWR-20911 fixes the arch detection that the SNOW-512 fix relies on. SNOW-748 fixes a Mac build failure introduced by SNOW-512.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/Variables.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index db0b44eb8f..6c2d9ec2a4 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -54,19 +54,20 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(LINUX ON BOOl FORCE)
# If someone has specified a word size, use that to determine the
- # architecture. Otherwise, let the architecture specify the word size.
+ # architecture. Otherwise, let the compiler specify the word size.
+ # Using uname will break under chroots and other cross arch compiles. RC
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)
+ if(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ set(ARCH i686)
set(WORD_SIZE 32)
- endif (ARCH STREQUAL x86_64)
+ else(CMAKE_SIZEOF_VOID_P MATCHES 4)
+ set(ARCH x86_64)
+ set(WORD_SIZE 64)
+ endif(CMAKE_SIZEOF_VOID_P MATCHES 4)
endif (WORD_SIZE EQUAL 32)
set(LL_ARCH ${ARCH}_linux)