diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-13 04:08:33 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-13 04:08:33 (GMT) |
commit | 1d72bdea9a8b571ab626d06110760fbe41b4de2e (patch) | |
tree | ac043456f855d4a30c7b7232cc7bf228f347af0e /Modules | |
parent | 9ab3b14c77bc92a94c8b1b949bdc0f91bb77c7a2 (diff) | |
download | CMake-1d72bdea9a8b571ab626d06110760fbe41b4de2e.zip CMake-1d72bdea9a8b571ab626d06110760fbe41b4de2e.tar.gz CMake-1d72bdea9a8b571ab626d06110760fbe41b4de2e.tar.bz2 |
ENH: move define into configured file and do not use the command line
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) |