Add sizeof some types support
This commit is contained in:
parent
bcbc8443b5
commit
6dfebfdbcd
|
@ -80,6 +80,15 @@ SET (CMAKE_MODULE_SUFFIX ".dll" CACHE STRING
|
|||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM make ${BCB_BIN_PATH})
|
||||
|
||||
# We will hardcode them for now. Make sure to fix that in the future
|
||||
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
|
||||
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
|
||||
SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
|
||||
SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
|
||||
SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
|
||||
SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
|
||||
SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
|
|
|
@ -24,6 +24,15 @@ SET (CMAKE_STATICLIB_SUFFIX ".lib" CACHE STRING
|
|||
SET (CMAKE_ANSI_CFLAGS "" CACHE INTERNAL
|
||||
"What flags are required by the c++ compiler to make it ansi.")
|
||||
|
||||
# We will hardcode them for now. Make sure to fix that in the future
|
||||
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
|
||||
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
|
||||
SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
|
||||
SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
|
||||
SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
|
||||
SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
|
||||
SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
|
||||
|
||||
# Build type
|
||||
|
||||
SET (CMAKE_BUILD_TYPE Debug CACHE STRING
|
||||
|
|
|
@ -119,6 +119,14 @@ SET (CMAKE_ANSI_CXXFLAGS @CMAKE_ANSI_CXXFLAGS@ CACHE INTERNAL
|
|||
SET (CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION @CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@ CACHE INTERNAL
|
||||
"Does the compiler not support explicit template instantiation.")
|
||||
|
||||
SET (CMAKE_SIZEOF_INT @CMAKE_SIZEOF_INT@ CACHE INTERNAL "Size of int data type")
|
||||
SET (CMAKE_SIZEOF_LONG @CMAKE_SIZEOF_LONG@ CACHE INTERNAL "Size of long data type")
|
||||
SET (CMAKE_SIZEOF_VOID_P @CMAKE_SIZEOF_VOID_P@ CACHE INTERNAL "Size of void* data type")
|
||||
SET (CMAKE_SIZEOF_CHAR @CMAKE_SIZEOF_CHAR@ CACHE INTERNAL "Size of char data type")
|
||||
SET (CMAKE_SIZEOF_SHORT @CMAKE_SIZEOF_SHORT@ CACHE INTERNAL "Size of short data type")
|
||||
SET (CMAKE_SIZEOF_FLOAT @CMAKE_SIZEOF_FLOAT@ CACHE INTERNAL "Size of float data type")
|
||||
SET (CMAKE_SIZEOF_DOUBLE @CMAKE_SIZEOF_DOUBLE@ CACHE INTERNAL "Size of double data type")
|
||||
|
||||
FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES gmake make )
|
||||
|
||||
# The following variables are advanced
|
||||
|
|
|
@ -25,6 +25,15 @@ SET (CMAKE_USE_WIN32_THREADS 1 CACHE BOOL
|
|||
SET (CMAKE_MAKE_PROGRAM "msdev" CACHE STRING
|
||||
"Program used to build from dsp files.")
|
||||
|
||||
# We will hardcode them for now. Make sure to fix that in the future
|
||||
SET (CMAKE_SIZEOF_INT 4 CACHE INTERNAL "Size of int data type")
|
||||
SET (CMAKE_SIZEOF_LONG 4 CACHE INTERNAL "Size of long data type")
|
||||
SET (CMAKE_SIZEOF_VOID_P 4 CACHE INTERNAL "Size of void* data type")
|
||||
SET (CMAKE_SIZEOF_CHAR 1 CACHE INTERNAL "Size of char data type")
|
||||
SET (CMAKE_SIZEOF_SHORT 2 CACHE INTERNAL "Size of short data type")
|
||||
SET (CMAKE_SIZEOF_FLOAT 4 CACHE INTERNAL "Size of float data type")
|
||||
SET (CMAKE_SIZEOF_DOUBLE 8 CACHE INTERNAL "Size of double data type")
|
||||
|
||||
# The following variables are advanced
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
|
@ -39,3 +48,5 @@ CMAKE_CXX_FLAGS_DEBUG
|
|||
CMAKE_USE_WIN32_THREADS
|
||||
CMAKE_MAKE_PROGRAM
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,28 @@ AC_PROG_CXX
|
|||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
CMAKE_SIZEOF_INT=$ac_cv_sizeof_int
|
||||
AC_SUBST(CMAKE_SIZEOF_INT)
|
||||
AC_CHECK_SIZEOF(long, 4)
|
||||
CMAKE_SIZEOF_LONG=$ac_cv_sizeof_long
|
||||
AC_SUBST(CMAKE_SIZEOF_LONG)
|
||||
AC_CHECK_SIZEOF(void *, 4)
|
||||
CMAKE_SIZEOF_VOID_P=$ac_cv_sizeof_void_p
|
||||
AC_SUBST(CMAKE_SIZEOF_VOID_P)
|
||||
AC_CHECK_SIZEOF(char, 1)
|
||||
CMAKE_SIZEOF_CHAR=$ac_cv_sizeof_char
|
||||
AC_SUBST(CMAKE_SIZEOF_CHAR)
|
||||
AC_CHECK_SIZEOF(short, 2)
|
||||
CMAKE_SIZEOF_SHORT=$ac_cv_sizeof_short
|
||||
AC_SUBST(CMAKE_SIZEOF_SHORT)
|
||||
AC_CHECK_SIZEOF(float, 4)
|
||||
CMAKE_SIZEOF_FLOAT=$ac_cv_sizeof_float
|
||||
AC_SUBST(CMAKE_SIZEOF_FLOAT)
|
||||
AC_CHECK_SIZEOF(double, 8)
|
||||
CMAKE_SIZEOF_DOUBLE=$ac_cv_sizeof_double
|
||||
AC_SUBST(CMAKE_SIZEOF_DOUBLE)
|
||||
|
||||
# check for X11 support
|
||||
AC_PATH_XTRA
|
||||
CMAKE_HAS_X=0
|
||||
|
|
Loading…
Reference in New Issue