Commit 575afc8b authored by Andy Cedilnik's avatar Andy Cedilnik
Browse files

ENH: support STDDEF and cleanup

parent 0d3bbe81
......@@ -8,6 +8,10 @@
# include <stdint.h>
#endif /* HAVE_STDINT_H */
#ifdef HAVE_STDDEF_H
# include <stddef.h>
#endif /* HAVE_STDDEF_H */
#ifdef __CLASSIC_C__
int main(){
int ac;
......
......@@ -12,13 +12,12 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
IF(HAVE_SYS_TYPES_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
ENDIF(HAVE_SYS_TYPES_H)
IF(HAVE_STDINT_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_STDINT_H")
ENDIF(HAVE_STDINT_H)
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
IF("${def}")
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
ENDIF("${def}")
ENDFOREACH(def)
MESSAGE(STATUS "Check size of ${TYPE}")
IF(CMAKE_REQUIRED_LIBRARIES)
SET(CHECK_TYPE_SIZE_ADD_LIBRARIES
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment