Add more messages, make messages look the same, add checks if test was already successfull
This commit is contained in:
parent
ebb6477dbb
commit
5b17658c91
|
@ -7,6 +7,7 @@
|
|||
#
|
||||
|
||||
MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
||||
IF(NOT ${VARIABLE})
|
||||
SET(MACRO_CHECK_FUNCTION_DEFINITIONS -DCHECK_FUNCTION_EXISTS=${FUNCTION})
|
||||
MESSAGE(STATUS "Looking for ${FUNCTION}")
|
||||
TRY_COMPILE(${VARIABLE}
|
||||
|
@ -16,12 +17,13 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
|
|||
OUTPUT_VARIABLE OUTPUT)
|
||||
IF(${VARIABLE})
|
||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
|
||||
MESSAGE(STATUS "Found ${FUNCTION}")
|
||||
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
|
||||
ELSE(${VARIABLE})
|
||||
MESSAGE(STATUS "${FUNCTION} not found")
|
||||
MESSAGE(STATUS "Looking for ${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"
|
||||
"${OUTPUT}\n" APPEND)
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF(NOT ${VARIABLE})
|
||||
ENDMACRO(CHECK_FUNCTION_EXISTS)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#
|
||||
|
||||
MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
||||
IF(NOT ${VARIABLE})
|
||||
SET(CHECK_INCLUDE_FILE_VAR ${INCLUDE})
|
||||
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CheckIncludeFile.c.in
|
||||
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c IMMEDIATE)
|
||||
|
@ -16,14 +17,15 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
|
|||
${PROJECT_BINARY_DIR}/CMakeTmp/CheckIncludeFile.c
|
||||
OUTPUT_VARIABLE OUTPUT)
|
||||
IF(${VARIABLE})
|
||||
MESSAGE(STATUS "Found ${INCLUDE}")
|
||||
MESSAGE(STATUS "Looking for ${INCLUDE} - found")
|
||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
|
||||
ELSE(${VARIABLE})
|
||||
MESSAGE(STATUS "${INCLUDE} not found.")
|
||||
MESSAGE(STATUS "Looking for ${INCLUDE} - not found.")
|
||||
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")
|
||||
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
|
||||
"Determining if the include file ${INCLUDE} "
|
||||
"exists failed with the following output:\n"
|
||||
"${OUTPUT}\n" APPEND)
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF(NOT ${VARIABLE})
|
||||
ENDMACRO(CHECK_INCLUDE_FILE)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#
|
||||
|
||||
MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
||||
IF(NOT ${VARIABLE})
|
||||
SET(MACRO_CHECK_LIBRARY_EXISTS_DEFINITION -DCHECK_FUNCTION_EXISTS=${FUNCTION})
|
||||
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY}")
|
||||
TRY_COMPILE(${VARIABLE}
|
||||
|
@ -19,14 +20,15 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
|
|||
OUTPUT_VARIABLE OUTPUT)
|
||||
|
||||
IF(${VARIABLE})
|
||||
MESSAGE(STATUS "Found ${FUNCTION} in ${LIBRARY}")
|
||||
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
|
||||
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
|
||||
ELSE(${VARIABLE})
|
||||
MESSAGE(STATUS "${FUNCTION} in ${LIBRARY} not found")
|
||||
MESSAGE(STATUS "Looking for ${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} "
|
||||
"failed with the following output:\n"
|
||||
"${OUTPUT}\n" APPEND)
|
||||
ENDIF(${VARIABLE})
|
||||
ENDIF(NOT ${VARIABLE})
|
||||
ENDMACRO(CHECK_LIBRARY_EXISTS)
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
#
|
||||
|
||||
MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
||||
IF(NOT ${VARIABLE})
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS -DCHECK_SIZE_OF="${TYPE}")
|
||||
IF(HAVE_SYS_TYPES_H)
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS
|
||||
"${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_SYS_TYPES_H")
|
||||
ENDIF(HAVE_SYS_TYPES_H)
|
||||
IF(HAVE_STDINT_H)
|
||||
SET(MACRO_CHECK_TYPE_SIZE_FLAGS "${MACRO_CHECK_TYPE_SIZE_FLAGS} -DHAVE_STDINT_H")
|
||||
|
@ -20,10 +22,13 @@ MACRO(CHECK_TYPE_SIZE TYPE VARIABLE)
|
|||
${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}")
|
||||
IF(HAVE_${VARIABLE})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - done")
|
||||
ELSE(HAVE_${VARIABLE})
|
||||
MESSAGE(STATUS "Check size of ${TYPE} - failed")
|
||||
WRITE_FILE(${PROJECT_BINARY_DIR}/CMakeError.log
|
||||
"Determining size of ${TYPE} failed with the following output:\n${OUTPUT}\n"
|
||||
APPEND)
|
||||
ENDIF(NOT HAVE_${VARIABLE})
|
||||
ENDIF(HAVE_${VARIABLE})
|
||||
ENDIF(NOT ${VARIABLE})
|
||||
ENDMACRO(CHECK_TYPE_SIZE)
|
||||
|
|
|
@ -4,15 +4,20 @@
|
|||
# CMAKE_NO_STD_NAMESPACE - defined accoreding to the results
|
||||
#
|
||||
|
||||
TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${PROJECT_BINARY_DIR}
|
||||
IF(NOT CMAKE_ANSI_FOR_SCOPE)
|
||||
MESSAGE(STATUS "Check for ANSI scope")
|
||||
TRY_COMPILE(CMAKE_ANSI_FOR_SCOPE ${PROJECT_BINARY_DIR}
|
||||
${CMAKE_ROOT}/Modules/TestForAnsiForScope.cxx)
|
||||
IF (CMAKE_ANSI_FOR_SCOPE)
|
||||
IF (CMAKE_ANSI_FOR_SCOPE)
|
||||
MESSAGE(STATUS "Check for ANSI scope - found")
|
||||
SET (CMAKE_NO_ANSI_FOR_SCOPE 0 CACHE INTERNAL
|
||||
"Does the compiler support ansi for scope.")
|
||||
ELSE (CMAKE_ANSI_FOR_SCOPE)
|
||||
ELSE (CMAKE_ANSI_FOR_SCOPE)
|
||||
MESSAGE(STATUS "Check for ANSI scope - not found")
|
||||
SET (CMAKE_NO_ANSI_FOR_SCOPE 1 CACHE INTERNAL
|
||||
"Does the compiler support ansi for scope.")
|
||||
ENDIF (CMAKE_ANSI_FOR_SCOPE)
|
||||
ENDIF (CMAKE_ANSI_FOR_SCOPE)
|
||||
ENDIF(NOT CMAKE_ANSI_FOR_SCOPE)
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -4,16 +4,21 @@
|
|||
# CMAKE_NO_ANSI_STREAM_HEADERS - defined accoreding to the results
|
||||
#
|
||||
|
||||
TRY_COMPILE(CMAKE_ANSI_STREAM_HEADERS ${PROJECT_BINARY_DIR}
|
||||
IF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
|
||||
MESSAGE(STATUS "Check for ANSI stream headers")
|
||||
TRY_COMPILE(CMAKE_ANSI_STREAM_HEADERS ${PROJECT_BINARY_DIR}
|
||||
${CMAKE_ROOT}/Modules/TestForANSIStreamHeaders.cxx)
|
||||
IF (CMAKE_ANSI_STREAM_HEADERS)
|
||||
IF (CMAKE_ANSI_STREAM_HEADERS)
|
||||
MESSAGE(STATUS "Check for ANSI stream headers - found")
|
||||
SET (CMAKE_NO_ANSI_STREAM_HEADERS 0 CACHE INTERNAL
|
||||
"Does the compiler support headers like iostream.")
|
||||
ELSE (CMAKE_ANSI_STREAM_HEADERS)
|
||||
ELSE (CMAKE_ANSI_STREAM_HEADERS)
|
||||
MESSAGE(STATUS "Check for ANSI stream headers - not found")
|
||||
SET (CMAKE_NO_ANSI_STREAM_HEADERS 1 CACHE INTERNAL
|
||||
"Does the compiler support headers like iostream.")
|
||||
ENDIF (CMAKE_ANSI_STREAM_HEADERS)
|
||||
ENDIF (CMAKE_ANSI_STREAM_HEADERS)
|
||||
|
||||
MARK_AS_ADVANCED(CMAKE_NO_ANSI_STREAM_HEADERS)
|
||||
MARK_AS_ADVANCED(CMAKE_NO_ANSI_STREAM_HEADERS)
|
||||
ENDIF(NOT CMAKE_NO_ANSI_STREAM_HEADERS)
|
||||
|
||||
|
||||
|
|
|
@ -4,15 +4,20 @@
|
|||
# CMAKE_NO_STD_NAMESPACE - defined accoreding to the results
|
||||
#
|
||||
|
||||
TRY_COMPILE(CMAKE_STD_NAMESPACE ${PROJECT_BINARY_DIR}
|
||||
IF(NOT CMAKE_STD_NAMESPACE)
|
||||
MESSAGE(STATUS "Check for STD namespace")
|
||||
TRY_COMPILE(CMAKE_STD_NAMESPACE ${PROJECT_BINARY_DIR}
|
||||
${CMAKE_ROOT}/Modules/TestForSTDNamespace.cxx)
|
||||
IF (CMAKE_STD_NAMESPACE)
|
||||
IF (CMAKE_STD_NAMESPACE)
|
||||
MESSAGE(STATUS "Check for STD namespace - found")
|
||||
SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
|
||||
"Does the compiler support std::.")
|
||||
ELSE (CMAKE_STD_NAMESPACE)
|
||||
ELSE (CMAKE_STD_NAMESPACE)
|
||||
MESSAGE(STATUS "Check for STD namespace - not found")
|
||||
SET (CMAKE_NO_STD_NAMESPACE 1 CACHE INTERNAL
|
||||
"Does the compiler support std::.")
|
||||
ENDIF (CMAKE_STD_NAMESPACE)
|
||||
ENDIF (CMAKE_STD_NAMESPACE)
|
||||
ENDIF(NOT CMAKE_STD_NAMESPACE)
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue