Create a variable for 64-bit to check uint64_t.

This commit is contained in:
Nicolás Ortega Froysa 2018-04-12 13:49:56 +02:00
parent 5cea65e807
commit 003e3d9604
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF
2 changed files with 5 additions and 0 deletions

View File

@ -39,6 +39,9 @@ set(CMAKE_EXE_LINKER_FLAGS "-ffreestanding -nostdlib")
# perform data type checks # perform data type checks
include(CheckTypeSize) include(CheckTypeSize)
if(64BIT)
check_type_size("uint64_t" UINT64_T)
endif()
check_type_size("uint32_t" UINT32_T) check_type_size("uint32_t" UINT32_T)
check_type_size("uint16_t" UINT16_T) check_type_size("uint16_t" UINT16_T)
check_type_size("uint8_t" UINT8_T) check_type_size("uint8_t" UINT8_T)

View File

@ -6,3 +6,5 @@ set(CMAKE_C_FLAGS "-ffreestanding -fno-builtin" CACHE STRING "C flags for test c
set(CMAKE_EXE_LINKER_FLAGS "-ffreestanding -nostdlib" CACHE STRING "Linker flags for test compilation.") set(CMAKE_EXE_LINKER_FLAGS "-ffreestanding -nostdlib" CACHE STRING "Linker flags for test compilation.")
set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_C_FLAGS) set(CMAKE_TRY_COMPILE_PLATFORM_VARIABLES CMAKE_C_FLAGS)
set(CMAKE_ASM_COMPILER i686-elf-as) set(CMAKE_ASM_COMPILER i686-elf-as)
set(64BIT FALSE CACHE BOOL "Whether the architecture supports 64-bit.")