summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEric Fiselier <eric@efcs.ca>2016-06-02 01:19:52 +0000
committerEric Fiselier <eric@efcs.ca>2016-06-02 01:19:52 +0000
commitced9d7783c7ecba2e62a2eba3aacfc995480169a (patch)
treec0eeb21c8f46520a9c22545c7ee3590002bb16e1 /CMakeLists.txt
parentc00311e30b6d72157070774b9f19b14b4c9dc7e1 (diff)
downloadlibunwind_llvm-ced9d7783c7ecba2e62a2eba3aacfc995480169a.tar.gz
Add status/warning message for 32 bit builds
git-svn-id: https://llvm.org/svn/llvm-project/libunwind/trunk@271462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d5ad2f9..26c0228 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -110,6 +110,16 @@ set(LIBUNWIND_TARGET_TRIPLE "" CACHE STRING "Target triple for cross compiling."
set(LIBUNWIND_GCC_TOOLCHAIN "" CACHE PATH "GCC toolchain for cross compiling.")
set(LIBUNWIND_SYSROOT "" CACHE PATH "Sysroot for cross compiling.")
+
+# Check that we can build with 32 bits if requested.
+if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32)
+ if (LIBUNWIND_BUILD_32_BITS AND NOT LLVM_BUILD_32_BITS) # Don't duplicate the output from LLVM
+ message(STATUS "Building 32 bits executables and libraries.")
+ endif()
+elseif(LIBUNWIND_BUILD_32_BITS)
+ message(FATAL_ERROR "LIBUNWIND_BUILD_32_BITS=ON is not supported on this platform.")
+endif()
+
#===============================================================================
# Configure System
#===============================================================================