ENH: Cleanups and add missing CMakeOutput.log and CMakeError.log appending. Close Bug #136 - Verify that all modules that do try compile produce CMakeError.log and CMakeOutput.log

This commit is contained in:
Andy Cedilnik 2003-08-08 11:59:07 -04:00
parent 565ed7d8a1
commit 8149dbed29
21 changed files with 135 additions and 47 deletions

View File

@ -49,9 +49,16 @@ MARK_AS_ADVANCED(CMAKE_RANLIB)
# test to see if the c compiler is gnu
EXEC_PROGRAM(${CMAKE_C_COMPILER} ARGS -E ${CMAKE_ROOT}/Modules/CMakeTestGNU.c OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCC 1)
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCC 1)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the C compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the C compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
ENDIF(NOT CMAKE_COMPILER_RETURN)

View File

@ -42,9 +42,16 @@ MARK_AS_ADVANCED(CMAKE_CXX_COMPILER)
# test to see if the cxx compiler is gnu
EXEC_PROGRAM(${CMAKE_CXX_COMPILER} ARGS -E ${CMAKE_ROOT}/Modules/CMakeTestGNU.c OUTPUT_VARIABLE CMAKE_COMPILER_OUTPUT RETURN_VALUE CMAKE_COMPILER_RETURN)
IF(NOT CMAKE_COMPILER_RETURN)
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCXX 1)
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
IF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
SET(CMAKE_COMPILER_IS_GNUCXX 1)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the C++ compiler is GNU succeeded with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ELSE("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the C++ compiler is GNU failed with "
"the following output:\n${CMAKE_COMPILER_OUTPUT}\n\n")
ENDIF("${CMAKE_COMPILER_OUTPUT}" MATCHES ".*THIS_IS_GNU.*" )
ENDIF(NOT CMAKE_COMPILER_RETURN)
# configure all variables set in this file

View File

@ -62,6 +62,9 @@ IF(CMAKE_SYSTEM_VERSION)
ENDIF(CMAKE_SYSTEM_VERSION)
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"The system is: ${CMAKE_SYSTEM_NAME} - ${CMAKE_SYSTEM_VERSION} - ${CMAKE_SYSTEM_PROCESSOR}\n")
# configure variables set in this file for fast reload
CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeSystem.cmake.in
${CMAKE_BINARY_DIR}/CMakeSystem.cmake IMMEDIATE)

View File

@ -17,6 +17,12 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the C compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
ELSE(NOT CMAKE_C_COMPILER_WORKS)
MESSAGE(STATUS "Check for working C compiler: ${CMAKE_C_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the C compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(NOT CMAKE_C_COMPILER_WORKS)

View File

@ -16,6 +16,12 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
"is not able to compile a simple test program.\nIt fails "
"with the following output:\n ${OUTPUT}\n\n"
"CMake will not be able to correctly generate this project.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the CXX compiler works failed with "
"the following output:\n${OUTPUT}\n\n")
ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
MESSAGE(STATUS "Check for working CXX compiler: ${CMAKE_CXX_COMPILER} -- works")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the CXX compiler works passed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)

View File

@ -1,9 +1,9 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES msdev
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
)
NAMES msdev
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\6.0\\Setup;VsCommonDir]/MSDev98/Bin
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"c:/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
"/Program Files/Microsoft Visual Studio/Common/MSDev98/Bin"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -1,9 +1,9 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VS;EnvironmentDirectory]
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.1\\Setup\\VS;EnvironmentDirectory]
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -1,9 +1,9 @@
FIND_PROGRAM(CMAKE_MAKE_PROGRAM
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
NAMES devenv
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\7.0\\Setup\\VS;EnvironmentDirectory]
"c:/Program Files/Microsoft Visual Studio .NET/Common7/IDE"
"c:/Program Files/Microsoft Visual Studio.NET/Common7/IDE"
"/Program Files/Microsoft Visual Studio .NET/Common7/IDE/"
)
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM)

View File

@ -24,6 +24,9 @@ MACRO(CHECK_FUNCTION_EXISTS FUNCTION VARIABLE)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have function ${FUNCTION}")
MESSAGE(STATUS "Looking for ${FUNCTION} - found")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have function ${FUNCTION}")

View File

@ -22,6 +22,10 @@ MACRO(CHECK_INCLUDE_FILE INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${INCLUDE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")

View File

@ -19,6 +19,10 @@ MACRO(CHECK_INCLUDE_FILE_CXX INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${INCLUDE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the include file ${INCLUDE} "
"exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Checking for CXX include file ${INCLUDE} -- not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have include ${INCLUDE}")

View File

@ -29,6 +29,10 @@ MACRO(CHECK_INCLUDE_FILES INCLUDE VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have include ${VARIABLE}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if files ${INCLUDE} "
"exist passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for include files ${VARIABLE} - not found.")
SET(${VARIABLE} "" CACHE INTERNAL "Have includes ${VARIABLE}")

View File

@ -28,6 +28,10 @@ MACRO(CHECK_LIBRARY_EXISTS LIBRARY FUNCTION LOCATION VARIABLE)
IF(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - found")
SET(${VARIABLE} 1 CACHE INTERNAL "Have library ${LIBRARY}")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the function ${FUNCTION} exists in the ${LIBRARY} "
"passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Looking for ${FUNCTION} in ${LIBRARY} - not found")
SET(${VARIABLE} "" CACHE INTERNAL "Have library ${LIBRARY}")

View File

@ -31,6 +31,8 @@ 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
"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

View File

@ -23,6 +23,9 @@ MACRO(CHECK_VARIABLE_EXISTS VAR VARIABLE)
IF(${VARIABLE})
SET(${VARIABLE} 1 CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VARIABLE} - found")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the variable ${VAR} exists passed with the following output:\n"
"${OUTPUT}\n\n")
ELSE(${VARIABLE})
SET(${VARIABLE} "" CACHE INTERNAL "Have variable ${VAR}")
MESSAGE(STATUS "Looking for ${VARIABLE} - not found")

View File

@ -3,7 +3,7 @@
# It defines:
# HTML_HELP_COMPILER : full path to the HTML Help Compiler (hhc.exe)
# HTML_HELP_INCLUDE_PATH : include path to the HTML Help API (htmlhelp.h)
# HTML_HELP_LIBRARY : full path to the HTML Help library (htmlhelp.lib)
# HTML_HELP_LIBRARY : full path to the HTML Help library (htmlhelp.lib)
#
IF (WIN32)
@ -12,7 +12,7 @@ IF (WIN32)
hhc
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]"
"C:/Program Files/HTML Help Workshop"
)
)
GET_FILENAME_COMPONENT (HTML_HELP_COMPILER_PATH ${HTML_HELP_COMPILER} PATH)
@ -21,19 +21,19 @@ IF (WIN32)
"${HTML_HELP_COMPILER_PATH}/include"
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include"
"C:/Program Files/HTML Help Workshop/include"
)
)
FIND_LIBRARY (HTML_HELP_LIBRARY
htmlhelp
"${HTML_HELP_COMPILER_PATH}/lib"
"[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib"
"C:/Program Files/HTML Help Workshop/lib"
)
)
MARK_AS_ADVANCED (
HTML_HELP_COMPILER
HTML_HELP_INCLUDE_PATH
HTML_HELP_LIBRARY
)
HTML_HELP_LIBRARY
)
ENDIF (WIN32)

View File

@ -9,9 +9,9 @@ SET( MFC_FOUND "NO" )
# Add MFC support if win32 and not cygwin and not borland
IF( WIN32 )
IF( NOT CYGWIN )
IF( NOT BORLAND )
SET( MFC_FOUND "YES" )
ENDIF( NOT BORLAND )
IF( NOT BORLAND )
SET( MFC_FOUND "YES" )
ENDIF( NOT BORLAND )
ENDIF( NOT CYGWIN )
ENDIF( WIN32 )

View File

@ -5,12 +5,30 @@
#
MACRO(TEST_BIG_ENDIAN VARIABLE)
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestBigEndian.c
OUTPUT_VARIABLE OUTPUT)
IF(NOT HAVE_${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining the endianes of the system failed with the following output:\n${OUTPUT}\n\n")
ENDIF(NOT HAVE_${VARIABLE})
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_ROOT}/Modules/TestBigEndian.c
OUTPUT_VARIABLE OUTPUT)
MESSAGE(STATUS "Check if the system is big endian")
IF(HAVE_${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining the endianes of the system passed. The system is ")
IF(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"big endian")
MESSAGE(STATUS "Check if the system is big endian - big endian")
ELSE(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"little endian")
MESSAGE(STATUS "Check if the system is big endian - little endian")
ENDIF(${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Test produced following output:\n${OUTPUT}\n\n")
ELSE(HAVE_${VARIABLE})
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining the endianes of the system failed with the following output:\n${OUTPUT}\n\n")
MESSAGE("Check if the system is big endian - failed")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
ENDMACRO(TEST_BIG_ENDIAN)

View File

@ -15,8 +15,13 @@ MACRO(CHECK_CXX_ACCEPTS_FLAG FLAGS VARIABLE)
OUTPUT_VARIABLE OUTPUT)
IF(${VARIABLE})
MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS} - yes")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the CXX compiler accepts the flag ${FLAGS} passed with "
"the following output:\n${OUTPUT}\n\n")
ELSE(${VARIABLE})
MESSAGE(STATUS "Checking to see if CXX compiler acepts flag ${FLAGS} - no")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the CXX compiler accepts the flag ${FLAGS} failed with the following output:\n${OUTPUT}\n\n")
"Determining if the CXX compiler accepts the flag ${FLAGS} failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF(${VARIABLE})
ENDMACRO(CHECK_CXX_ACCEPTS_FLAG)

View File

@ -11,11 +11,17 @@ IF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^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.")
"Does the compiler support ansi for scope.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the CXX compiler understands ansi for scopes passed with "
"the following output:\n${OUTPUT}\n\n")
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.")
"Does the compiler support ansi for scope.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the CXX compiler understands ansi for scopes failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_ANSI_FOR_SCOPE)
ENDIF("CMAKE_ANSI_FOR_SCOPE" MATCHES "^CMAKE_ANSI_FOR_SCOPE$")

View File

@ -11,10 +11,16 @@ IF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")
MESSAGE(STATUS "Check for STD namespace - found")
SET (CMAKE_NO_STD_NAMESPACE 0 CACHE INTERNAL
"Does the compiler support std::.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeOutput.log
"Determining if the CXX compiler has std namespace passed with "
"the following output:\n${OUTPUT}\n\n")
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::.")
FILE(APPEND ${CMAKE_BINARY_DIR}/CMakeError.log
"Determining if the CXX compiler has std namespace failed with "
"the following output:\n${OUTPUT}\n\n")
ENDIF (CMAKE_STD_NAMESPACE)
ENDIF("CMAKE_STD_NAMESPACE" MATCHES "^CMAKE_STD_NAMESPACE$")