ENH: append to log files

This commit is contained in:
Bill Hoffman 2006-04-19 17:23:23 -04:00
parent 84b5a3b021
commit 013f6d6b5f
2 changed files with 8 additions and 8 deletions

View File

@ -43,17 +43,17 @@ MACRO(CHECK_C_SOURCE_COMPILES SOURCE VAR)
IF(${VAR}) IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}") SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${VAR} - Success") MESSAGE(STATUS "Performing Test ${VAR} - Success")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n" "Performing C SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n" "${OUTPUT}\n"
"Source file was:\n${SOURCE}\n" APPEND) "Source file was:\n${SOURCE}\n")
ELSE(${VAR}) ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${VAR} - Failed") MESSAGE(STATUS "Performing Test ${VAR} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}") SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeError.log FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Performing C SOURCE FILE Test ${VAR} failed with the following output:\n" "Performing C SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n" "${OUTPUT}\n"
"Source file was:\n${SOURCE}\n" APPEND) "Source file was:\n${SOURCE}\n")
ENDIF(${VAR}) ENDIF(${VAR})
ENDIF("${VAR}" MATCHES "^${VAR}$") ENDIF("${VAR}" MATCHES "^${VAR}$")
ENDMACRO(CHECK_C_SOURCE_COMPILES) ENDMACRO(CHECK_C_SOURCE_COMPILES)

View File

@ -43,17 +43,17 @@ MACRO(CHECK_CXX_SOURCE_COMPILES SOURCE VAR)
IF(${VAR}) IF(${VAR})
SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}") SET(${VAR} 1 CACHE INTERNAL "Test ${FUNCTION}")
MESSAGE(STATUS "Performing Test ${VAR} - Success") MESSAGE(STATUS "Performing Test ${VAR} - Success")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeOutput.log
"Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n" "Performing C++ SOURCE FILE Test ${VAR} succeded with the following output:\n"
"${OUTPUT}\n" "${OUTPUT}\n"
"Source file was:\n${SOURCE}\n" APPEND) "Source file was:\n${SOURCE}\n")
ELSE(${VAR}) ELSE(${VAR})
MESSAGE(STATUS "Performing Test ${VAR} - Failed") MESSAGE(STATUS "Performing Test ${VAR} - Failed")
SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}") SET(${VAR} "" CACHE INTERNAL "Test ${FUNCTION}")
FILE(WRITE ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeFiles/CMakeError.log
"Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n" "Performing C++ SOURCE FILE Test ${VAR} failed with the following output:\n"
"${OUTPUT}\n" "${OUTPUT}\n"
"Source file was:\n${SOURCE}\n" APPEND) "Source file was:\n${SOURCE}\n")
ENDIF(${VAR}) ENDIF(${VAR})
ENDIF("${VAR}" MATCHES "^${VAR}$") ENDIF("${VAR}" MATCHES "^${VAR}$")
ENDMACRO(CHECK_CXX_SOURCE_COMPILES) ENDMACRO(CHECK_CXX_SOURCE_COMPILES)