ENH: move define into configured file and do not use the command line
This commit is contained in:
parent
9ab3b14c77
commit
1d72bdea9a
|
@ -1,6 +1,5 @@
|
||||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
|
||||||
|
|
||||||
@CHECK_TYPE_SIZE_PREINCLUDE@
|
@CHECK_TYPE_SIZE_PREINCLUDE@
|
||||||
|
#ifdef CHECK_TYPE_SIZE_TYPE
|
||||||
|
|
||||||
#ifdef HAVE_SYS_TYPES_H
|
#ifdef HAVE_SYS_TYPES_H
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
|
|
|
@ -10,14 +10,14 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||||
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
|
||||||
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||||
"-DCHECK_TYPE_SIZE_TYPE=\"${TYPE}\" ${CMAKE_REQUIRED_FLAGS}")
|
"${CMAKE_REQUIRED_FLAGS}")
|
||||||
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H)
|
||||||
IF("${def}")
|
IF("${def}")
|
||||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||||
ENDIF("${def}")
|
ENDIF("${def}")
|
||||||
ENDFOREACH(def)
|
ENDFOREACH(def)
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN)
|
SET(CHECK_TYPE_SIZE_PREINCLUDE "#define CHECK_TYPE_SIZE_TYPE ${TYPE}\n")
|
||||||
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES})
|
||||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||||
ENDFOREACH(def)
|
ENDFOREACH(def)
|
||||||
|
|
Loading…
Reference in New Issue