CheckTypeSize
: Check sizeof a typeCHECK_TYPE_SIZE(TYPE VARIABLE [BUILTIN_TYPES_ONLY])
Check if the type exists and determine size of type. if the type exists, the size will be stored to the variable. This also calls check_include_file for sys/types.h stdint.h and stddef.h, setting HAVE_SYS_TYPES_H, HAVE_STDINT_H, and HAVE_STDDEF_H. This is because many types are stored in these include files.
VARIABLE - variable to store size if the type exists.
HAVE_${VARIABLE} - does the variable exists or not
BUILTIN_TYPES_ONLY - The third argument is optional and if
it is set to the string BUILTIN_TYPES_ONLY
this macro will not check for any header files.
The following variables may be set before calling this macro to modify the way the check is run:
CMAKE_REQUIRED_FLAGS = string of compile command line flags
CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
CMAKE_REQUIRED_INCLUDES = list of include directories
CMAKE_REQUIRED_LIBRARIES = list of libraries to link