diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CheckTypeSize.c.in | 3 | ||||
-rw-r--r-- | Modules/CheckTypeSize.cmake | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/Modules/CheckTypeSize.c.in b/Modules/CheckTypeSize.c.in index 822d9c5..2f99d7d 100644 --- a/Modules/CheckTypeSize.c.in +++ b/Modules/CheckTypeSize.c.in @@ -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> diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 14d97d6..1dd8b81 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -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) |