diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-17 15:21:45 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2006-01-17 15:21:45 (GMT) |
commit | 9891260a6dab66c9ea44b5c2e244f3128625baf5 (patch) | |
tree | 930651e4383fe1d904cc9c493bd859cb97b530af /Utilities/cmcurl/CMake | |
parent | 2694ad76c538333d3ff45613bd1201f97af003cd (diff) | |
download | CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.zip CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.gz CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.bz2 |
ENH: add support for watcom wmake and wcl386
Diffstat (limited to 'Utilities/cmcurl/CMake')
-rw-r--r-- | Utilities/cmcurl/CMake/CheckTypeSize.c.in | 2 | ||||
-rw-r--r-- | Utilities/cmcurl/CMake/CheckTypeSize.cmake | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/Utilities/cmcurl/CMake/CheckTypeSize.c.in b/Utilities/cmcurl/CMake/CheckTypeSize.c.in index 822d9c5..8c9a016 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.c.in +++ b/Utilities/cmcurl/CMake/CheckTypeSize.c.in @@ -1,7 +1,7 @@ +#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/Utilities/cmcurl/CMake/CheckTypeSize.cmake b/Utilities/cmcurl/CMake/CheckTypeSize.cmake index 26c822d..be76154 100644 --- a/Utilities/cmcurl/CMake/CheckTypeSize.cmake +++ b/Utilities/cmcurl/CMake/CheckTypeSize.cmake @@ -1,28 +1,28 @@ -# +# - Check sizeof a type +# CHECK_TYPE_SIZE(TYPE VARIABLE) # Check if the type exists and determine size of type. if the type # exists, the size will be stored to the variable. # -# CHECK_TYPE_SIZE - macro which checks the size of type -# VARIABLE - variable to store size if the type exists. -# HAVE_${VARIABLE} - does the variable exists or not -# +# VARIABLE - variable to store size if the type exists. +# HAVE_${VARIABLE} - does the variable exists or not 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 - "-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) FOREACH(def ${CMAKE_EXTRA_INCLUDE_FILES}) SET(CHECK_TYPE_SIZE_PREMAIN "${CHECK_TYPE_SIZE_PREMAIN}#include \"${def}\"\n") ENDFOREACH(def) - CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/CMake/CheckTypeSize.c.in" + CONFIGURE_FILE("${CMAKE_ROOT}/Modules/CheckTypeSize.c.in" "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" IMMEDIATE @ONLY) FILE(READ "${CMAKE_BINARY_DIR}/CMakeFiles/CMakeTmp/CheckTypeSize.c" CHECK_TYPE_SIZE_FILE_CONTENT) @@ -39,11 +39,11 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE) OUTPUT_VARIABLE OUTPUT) IF(HAVE_${VARIABLE}) MESSAGE(STATUS "Check size of ${TYPE} - done") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log "Determining size of ${TYPE} passed with the following output:\n${OUTPUT}\n\n") ELSE(HAVE_${VARIABLE}) MESSAGE(STATUS "Check size of ${TYPE} - failed") - FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log + FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log "Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\nCheckTypeSize.c:\n${CHECK_TYPE_SIZE_FILE_CONTENT}\n\n") ENDIF(HAVE_${VARIABLE}) ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$") |