[Cmake-commits] CMake branch, next, updated. v2.8.6-2221-g2e99d2d

Brad King brad.king at kitware.com
Thu Dec 15 08:34:01 EST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  2e99d2d5e1e50e762cb272241a3e61e5e63d77ab (commit)
       via  5f6985ac869150e468f8ad388bdbb8a39010cbb5 (commit)
      from  87a670500359d638a83c89482edf5923708e431d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2e99d2d5e1e50e762cb272241a3e61e5e63d77ab
commit 2e99d2d5e1e50e762cb272241a3e61e5e63d77ab
Merge: 87a6705 5f6985a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 15 08:34:00 2011 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 15 08:34:00 2011 -0500

    Merge topic 'test-compiler-output-var' into next
    
    5f6985a Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f6985ac869150e468f8ad388bdbb8a39010cbb5
commit 5f6985ac869150e468f8ad388bdbb8a39010cbb5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 15 08:29:43 2011 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 15 08:31:17 2011 -0500

    Avoid clobbering variable 'OUTPUT' in compiler tests (#12628)
    
    Use an obscure name and clean up afterwards.

diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 4d4e35f..779b2f0 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -35,7 +35,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
     "{ (void)argv; return argc-1;}\n")
   TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR} 
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
-    OUTPUT_VARIABLE OUTPUT) 
+    OUTPUT_VARIABLE __CMAKE_C_COMPILER_OUTPUT)
   SET(C_TEST_WAS_RUN 1)
 ENDIF(NOT CMAKE_C_COMPILER_WORKS)
 
@@ -43,7 +43,7 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
   PrintTestCompilerStatus("C" " -- broken")
   FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
     "Determining if the C compiler works failed with "
-    "the following output:\n${OUTPUT}\n\n")
+    "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
   # if the compiler is broken make sure to remove the platform file
   # since Windows-cl configures both c/cxx files both need to be removed
   # when c or c++ fails
@@ -51,14 +51,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
   FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
   MESSAGE(FATAL_ERROR "The C compiler \"${CMAKE_C_COMPILER}\" "
     "is not able to compile a simple test program.\nIt fails "
-    "with the following output:\n ${OUTPUT}\n\n"
+    "with the following output:\n ${__CMAKE_C_COMPILER_OUTPUT}\n\n"
     "CMake will not be able to correctly generate this project.")
 ELSE(NOT CMAKE_C_COMPILER_WORKS)
   IF(C_TEST_WAS_RUN)
     PrintTestCompilerStatus("C" " -- works")
     FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
       "Determining if the C compiler works passed with "
-      "the following output:\n${OUTPUT}\n\n") 
+      "the following output:\n${__CMAKE_C_COMPILER_OUTPUT}\n\n")
   ENDIF(C_TEST_WAS_RUN)
   SET(CMAKE_C_COMPILER_WORKS 1 CACHE INTERNAL "")
 
@@ -84,3 +84,4 @@ ELSE(NOT CMAKE_C_COMPILER_WORKS)
   ENDIF()
 ENDIF(NOT CMAKE_C_COMPILER_WORKS)
 
+UNSET(__CMAKE_C_COMPILER_OUTPUT)
diff --git a/Modules/CMakeTestCXXCompiler.cmake b/Modules/CMakeTestCXXCompiler.cmake
index 494add3..87022e9 100644
--- a/Modules/CMakeTestCXXCompiler.cmake
+++ b/Modules/CMakeTestCXXCompiler.cmake
@@ -28,7 +28,7 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
     "int main(){return 0;}\n")
   TRY_COMPILE(CMAKE_CXX_COMPILER_WORKS ${CMAKE_BINARY_DIR} 
     ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCXXCompiler.cxx
-    OUTPUT_VARIABLE OUTPUT)
+    OUTPUT_VARIABLE __CMAKE_CXX_COMPILER_OUTPUT)
   SET(CXX_TEST_WAS_RUN 1)
 ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
 
@@ -41,17 +41,17 @@ IF(NOT CMAKE_CXX_COMPILER_WORKS)
   FILE(REMOVE ${CMAKE_PLATFORM_ROOT_BIN}/CMakeCXXPlatform.cmake )
   FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
     "Determining if the CXX compiler works failed with "
-    "the following output:\n${OUTPUT}\n\n")
+    "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
   MESSAGE(FATAL_ERROR "The C++ compiler \"${CMAKE_CXX_COMPILER}\" "
     "is not able to compile a simple test program.\nIt fails "
-    "with the following output:\n ${OUTPUT}\n\n"
+    "with the following output:\n ${__CMAKE_CXX_COMPILER_OUTPUT}\n\n"
     "CMake will not be able to correctly generate this project.")
 ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
   IF(CXX_TEST_WAS_RUN)
     PrintTestCompilerStatus("CXX" " -- works")
     FILE(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
       "Determining if the CXX compiler works passed with "
-      "the following output:\n${OUTPUT}\n\n")
+      "the following output:\n${__CMAKE_CXX_COMPILER_OUTPUT}\n\n")
   ENDIF(CXX_TEST_WAS_RUN)
   SET(CMAKE_CXX_COMPILER_WORKS 1 CACHE INTERNAL "")
 
@@ -76,3 +76,5 @@ ELSE(NOT CMAKE_CXX_COMPILER_WORKS)
     UNSET(CMAKE_CXX_ABI_FILES)
   ENDIF()
 ENDIF(NOT CMAKE_CXX_COMPILER_WORKS)
+
+UNSET(__CMAKE_CXX_COMPILER_OUTPUT)

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeTestCCompiler.cmake   |    9 +++++----
 Modules/CMakeTestCXXCompiler.cmake |   10 ++++++----
 2 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list