aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-03-02 18:04:58 +0200
committerThomas Winget <tewinget@gmail.com>2015-03-17 18:26:48 -0400
commitc97a685a3756186469be89dd67b9a31029c5bdb2 (patch)
tree76a27f2d789e9186a6cd9c23ba0b8767781c0e81 /CMakeLists.txt
parentfixed msys2 / mingw folders based on architecture, added license to unbound C... (diff)
downloadmonero-c97a685a3756186469be89dd67b9a31029c5bdb2.tar.xz
fixed arch_width option
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0900c3a7..6b3606157 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -67,11 +67,17 @@ enable_testing()
# Check whether we're on a 32-bit or 64-bit system
if(CMAKE_SIZEOF_VOID_P EQUAL "8")
- set(DEFAULT_ARCH_WIDTH "64")
+ set(DEFAULT_BUILD_64 ON)
else()
- set(DEFAULT_ARCH_WIDTH "32")
+ set(DEFAULT_BUILD_64 OFF)
+endif()
+option(BUILD_64 "Build for 64-bit? 'No' builds for 32-bit." ${DEFAULT_BUILD_64})
+
+if(BUILD_64)
+ set(ARCH_WIDTH "64")
+else()
+ set(ARCH_WIDTH "32")
endif()
-option(ARCH_WIDTH "Platform architecture in bits (32 or 64)" ${DEFAULT_ARCH_WIDTH})
message(STATUS "Building for a ${ARCH_WIDTH}-bit system")
# Check if we're on FreeBSD so we can exclude the local miniupnpc (it should be installed from ports instead)