aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-03-02 17:10:16 +0200
committerThomas Winget <tewinget@gmail.com>2015-03-17 18:26:29 -0400
commit3b3da8648325615ba2893a7b85bda14cc6684838 (patch)
tree11d507e15316f52e89d2e58a78c88fa32d6bcbd2 /CMakeLists.txt
parentremoved findlmdb.cmake, no longer required (diff)
downloadmonero-3b3da8648325615ba2893a7b85bda14cc6684838.tar.xz
moved 32-bit/64-bit detection into main CMakeLists
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef479095f..c7f04c6f9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -65,6 +65,15 @@ option(BOOST_IGNORE_SYSTEM_PATHS "Ignore boost system paths for local boost inst
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
enable_testing()
+# Check whether we're on a 32-bit or 64-bit system
+if(CMAKE_SIZEOF_VOID_P EQUAL "8")
+ message(STATUS "Building on a 64-bit system")
+ set(ARCH_WIDTH "64")
+else()
+ message(STATUS "Building on a 32-bit system")
+ set(ARCH_WIDTH "32")
+endif()
+
# Check if we're on FreeBSD so we can exclude the local miniupnpc (it should be installed from ports instead)
# CMAKE_SYSTEM_NAME checks are commonly known, but specifically taken from libsdl's CMakeLists
if(CMAKE_SYSTEM_NAME MATCHES "kFreeBSD.*")