summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-word-size.cmake
blob: c670ed590c201f649a765a992c149b27dded36b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
include(CheckTypeSize)
check_type_size(void* opentrack-word-size BUILTIN_TYPES_ONLY LANGUAGE C)
message(STATUS "detected word size is ${opentrack-word-size}")
if(opentrack-word-size LESS 4)
    message(FATAL_ERROR "word size either misdetected or really less than 4")
endif()
set(opentrack-word-size ${opentrack-word-size})
if(opentrack-word-size EQUAL 8)
    set(opentrack-64bit TRUE)
else()
    set(opentrack-64bit FALSE)
endif()