diff options
author | callum <none@none> | 2010-10-04 17:40:59 -0700 |
---|---|---|
committer | callum <none@none> | 2010-10-04 17:40:59 -0700 |
commit | 21c8dea4e460939aae0767e791f3efed03dc91b3 (patch) | |
tree | fee1d569617bbe97a2e492a73deae7383da65868 /indra/cmake/Variables.cmake | |
parent | 89efb318141bb504597e525f186ea1a43502eac4 (diff) | |
parent | 7af6d1c7319bc0f339e9159161c05ed6eb45fb5b (diff) |
Test merge
Diffstat (limited to 'indra/cmake/Variables.cmake')
-rw-r--r-- | indra/cmake/Variables.cmake | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index bfaf3f4f26..230e228c62 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) |