mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Check sizeof(int) and sizeof(size_t)
This commit is contained in:
parent
0a82cb4072
commit
e86d23daed
1 changed files with 11 additions and 0 deletions
|
@ -1,8 +1,19 @@
|
|||
project(minetest)
|
||||
|
||||
INCLUDE(CheckTypeSize)
|
||||
INCLUDE(CheckIncludeFiles)
|
||||
INCLUDE(CheckLibraryExists)
|
||||
|
||||
check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAGE CXX)
|
||||
if(SIZEOF_INT LESS 4)
|
||||
message(FATAL_ERROR "Minetest will not work with int less than 32 bits wide.")
|
||||
endif()
|
||||
|
||||
check_type_size(size_t SIZEOF_SIZE_T LANGUAGE CXX)
|
||||
if(SIZEOF_SIZE_T LESS 4)
|
||||
message(FATAL_ERROR "Minetest will not work with size_t less than 32 bits wide.")
|
||||
endif()
|
||||
|
||||
# Add custom SemiDebug build mode
|
||||
set(CMAKE_CXX_FLAGS_SEMIDEBUG "-O1 -g -Wall" CACHE STRING
|
||||
"Flags used by the C++ compiler during semidebug builds."
|
||||
|
|
Loading…
Add table
Reference in a new issue