diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-13 14:57:15 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-13 14:57:15 (GMT) |
commit | 96f948adf5ff0299bd1fa2f069da0f375596614d (patch) | |
tree | f4a2b9740600ccbf9394e2568c11e703efc7284c | |
parent | 0c644dea70fab1a8567866c818f60f1b9c805f3c (diff) | |
download | CMake-96f948adf5ff0299bd1fa2f069da0f375596614d.zip CMake-96f948adf5ff0299bd1fa2f069da0f375596614d.tar.gz CMake-96f948adf5ff0299bd1fa2f069da0f375596614d.tar.bz2 |
ENH: fix checktypesize
-rw-r--r-- | Modules/CheckTypeSize.c.in | 3 | ||||
-rw-r--r-- | Modules/CheckTypeSize.cmake | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Modules/CheckTypeSize.c.in b/Modules/CheckTypeSize.c.in index 2f99d7d..8c9a016 100644 --- a/Modules/CheckTypeSize.c.in +++ b/Modules/CheckTypeSize.c.in @@ -1,6 +1,7 @@ -@CHECK_TYPE_SIZE_PREINCLUDE@ +#cmakedefine CHECK_TYPE_SIZE_TYPE @CHECK_TYPE_SIZE_TYPE@ #ifdef CHECK_TYPE_SIZE_TYPE +@CHECK_TYPE_SIZE_PREINCLUDE@ #ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif /* HAVE_SYS_TYPES_H */ diff --git a/Modules/CheckTypeSize.cmake b/Modules/CheckTypeSize.cmake index 1dd8b81..be76154 100644 --- a/Modules/CheckTypeSize.cmake +++ b/Modules/CheckTypeSize.cmake @@ -9,6 +9,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1) IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") + SET(CHECK_TYPE_SIZE_TYPE "${TYPE}") SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${CMAKE_REQUIRED_FLAGS}") FOREACH(def HAVE_SYS_TYPES_H HAVE_STDINT_H HAVE_STDDEF_H) @@ -17,7 +18,7 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) "${MACRO_CHECK_TYPE_SIZE_FLAGS} -D${def}") ENDIF("${def}") ENDFOREACH(def) - SET(CHECK_TYPE_SIZE_PREINCLUDE "#define CHECK_TYPE_SIZE_TYPE ${TYPE}\n") + SET(CHECK_TYPE_SIZE_PREINCLUDE) FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES}) SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n") ENDFOREACH(def) |