summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCXXCompiler.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-08-08 15:59:07 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-08-08 15:59:07 (GMT)
commit8149dbed29973c2f37dcea0357cdb94ad84ecfb1 (patch)
tree80720127011181188b234a140b5346d38e79d09a /Modules/CMakeDetermineCXXCompiler.cmake
parent565ed7d8a184fdf4157f4c2c4fabe1ce4b07fde3 (diff)
downloadCMake-8149dbed29973c2f37dcea0357cdb94ad84ecfb1.zip
CMake-8149dbed29973c2f37dcea0357cdb94ad84ecfb1.tar.gz
CMake-8149dbed29973c2f37dcea0357cdb94ad84ecfb1.tar.bz2
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
Diffstat (limited to 'Modules/CMakeDetermineCXXCompiler.cmake')
-rw-r--r--Modules/CMakeDetermineCXXCompiler.cmake13
1 files changed, 10 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 57a8326..f5e3c60 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -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