diff options
Diffstat (limited to 'linden/indra/cmake/Variables.cmake')
-rw-r--r-- | linden/indra/cmake/Variables.cmake | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/linden/indra/cmake/Variables.cmake b/linden/indra/cmake/Variables.cmake index 65fe841..88c0c5c 100644 --- a/linden/indra/cmake/Variables.cmake +++ b/linden/indra/cmake/Variables.cmake | |||
@@ -51,8 +51,30 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") | |||
51 | 51 | ||
52 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | 52 | if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |
53 | set(LINUX ON BOOl FORCE) | 53 | set(LINUX ON BOOl FORCE) |
54 | execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ | 54 | |
55 | OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) | 55 | # If someone has specified a word size, use that to determine the |
56 | # architecture. Otherwise, let the architecture specify the word size. | ||
57 | |||
58 | if ("$ENV{WORD_SIZE}" MATCHES "32") | ||
59 | set(WORD_SIZE 32) | ||
60 | elseif ("$ENV{WORD_SIZE}" MATCHES "64") | ||
61 | set(WORD_SIZE 64) | ||
62 | endif () | ||
63 | |||
64 | if (WORD_SIZE EQUAL 32) | ||
65 | set(ARCH i686) | ||
66 | elseif (WORD_SIZE EQUAL 64) | ||
67 | set(ARCH x86_64) | ||
68 | else (WORD_SIZE EQUAL 32) | ||
69 | execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ | ||
70 | OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
71 | if (ARCH STREQUAL x86_64) | ||
72 | set(WORD_SIZE 64) | ||
73 | else (ARCH STREQUAL x86_64) | ||
74 | set(WORD_SIZE 32) | ||
75 | endif (ARCH STREQUAL x86_64) | ||
76 | endif (WORD_SIZE EQUAL 32) | ||
77 | |||
56 | set(LL_ARCH ${ARCH}_linux) | 78 | set(LL_ARCH ${ARCH}_linux) |
57 | set(LL_ARCH_DIR ${ARCH}-linux) | 79 | set(LL_ARCH_DIR ${ARCH}-linux) |
58 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") | 80 | endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux") |