summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2018-05-12 12:31:27 +0300
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2018-05-12 12:31:27 +0300
commit63224902a50c68b3ce4e38827199bae4d50746f3 (patch)
tree5a60588d11d209ce20f01c94a46ea41cd53c324f /src/CMakeLists.txt
parenta6920ce0f199c772ede76f0ae475cbf99d9f58bf (diff)
downloadcolm-63224902a50c68b3ce4e38827199bae4d50746f3.tar.gz
The type word_t declaration
If sizeof(unsigned long) == sizeof(void *) then word_t is unsigned long. Else if sizeof(unsigned long long) == sizeof(void *) then word_t is unsigned long long. Compilation checked with MSYS2 toolchains via Autotools project and with MinGW-w64 toolchains via CMake project.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e24f6df0..6a7b43a3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,11 +1,9 @@
# Check type size
include(CheckTypeSize)
check_type_size("long" SIZEOF_LONG)
-check_type_size("unsigned long" SIZEOF_ULONG)
-
-if(SIZEOF_ULONG LESS CMAKE_SIZEOF_VOID_P)
- message(FATAL_ERROR "Check CodeVect::insertTree implementation, because sizeof(word_t) < sizeof(void*)!")
-endif()
+check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
+check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
+check_type_size("void *" SIZEOF_VOID_P)
# Check system headers
include(CheckIncludeFile)