Commit e89abec69f114a4480431c74160558b86148af41

Edward Thomson 2016-03-28T09:50:31

Merge pull request #3708 from sschuberth/master CMakeLists: Further improve the error messages regarding CMAKE_SIZEOF_VOID_P

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b6a725..17b5fba 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