ENH: add status messages

This commit is contained in:
Bill Hoffman 2002-11-13 16:31:12 -05:00
parent 20b7e6b222
commit fe8428a3ee
4 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
SET(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=${FUNCTION})
MESSAGE(STATUS "Looking for ${FUNCTION}")
TRY_COMPILE(${VARIABLE}
${PROJECT_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
@ -15,7 +16,9 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
MESSAGE(STATUS "Found ${FUNCTION}")
ELSE(${VARIABLE})
MESSAGE(STATUS "${FUNCTION} not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the function ${FUNCTION} exists failed with the following output:\n"

View File

@ -10,13 +10,16 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
MESSAGE(STATUS "Looking for ${INCLUDE}")
TRY_COMPILE(${VARIABLE}
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Found ${INCLUDE}")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
ELSE(${VARIABLE})
MESSAGE(STATUS "${INCLUDE} not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the include file ${INCLUDE} "

View File

@ -8,6 +8,7 @@
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION -DCHECK_FUNCTION_EXISTS=${FUNCTION})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
TRY_COMPILE(${VARIABLE}
${PROJECT_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckFunctionExists.c
@ -18,8 +19,10 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Found ${FUNCTION} in ${LIBRARY}")
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
ELSE(${VARIABLE})
MESSAGE(STATUS "${FUNCTION} in ${LIBRARY} not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "

View File

@ -14,13 +14,14 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
IF(HAVE_STDINT_H)
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_STDINT_H")
ENDIF(HAVE_STDINT_H)
MESSAGE(STATUS "Check size of ${TYPE}")
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${PROJECT_BINARY_DIR}
${CMAKE_ROOT}/Modules/CheckSizeOf.c
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${MACRO_CHECK_TYPE_SIZE_FLAGS}
OUTPUT_VARIABLE OUTPUT)
IF(NOT HAVE_${VARIABLE})
MESSAGE(STATUS "Error in Check size of ${TYPE}")
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n"
APPEND)