From 035430b7f353c723e881b3fd92d4057088783eda Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 24 Mar 2016 14:10:29 +0100 Subject: [PATCH] CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b6a72550..17b5fba7b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -580,8 +580,10 @@ IF (CMAKE_SIZEOF_VOID_P EQUAL 8) ADD_DEFINITIONS(-DGIT_ARCH_64) ELSEIF (CMAKE_SIZEOF_VOID_P EQUAL 4) ADD_DEFINITIONS(-DGIT_ARCH_32) -ELSE() +ELSEIF (CMAKE_SIZEOF_VOID_P) MESSAGE(FATAL_ERROR "Unsupported architecture (pointer size is ${CMAKE_SIZEOF_VOID_P} bytes)") +ELSE() + MESSAGE(FATAL_ERROR "Unsupported architecture (CMAKE_SIZEOF_VOID_P is unset)") ENDIF() # Compile and link libgit2