CrucibleCheckTargetSupported.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
include_guard(GLOBAL) include(CheckCXXSourceCompiles) function(crucible_check_target_supported) check_cxx_source_compiles( " #include <climits> static_assert(sizeof(void *) == 8); static_assert(CHAR_BIT == 8); int main() { return 0; } " CRUCIBLE_HAVE_64_BITS) if(NOT CRUCIBLE_HAVE_64_BITS) message(FATAL_ERROR "Crucible only supports 64-bit targets with 8-bit bytes") endif() endfunction()