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@
|
||||
#ifdef CHECK_TYPE_SIZE_TYPE
|
||||
|
||||
#ifdef HAVE_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)
|
||||
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
|
||||
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)
|
||||
IF("${def}")
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}")
|
||||
ENDIF("${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})
|
||||
SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n")
|
||||
ENDFOREACH(def)
|
||||
|
|
Loading…
Reference in New Issue