[cmake-commits] king committed FindQt4.cmake 1.69 1.70

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Mar 1 16:44:34 EST 2007


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv25501

Modified Files:
	FindQt4.cmake 
Log Message:
BUG: Fix bug introduced by revision 1.67.  The qmake query mode prints information to stderr on some platforms.  The OUTPUT_VARIABLE and ERROR_VARIABLE must be the same variable to get all the output.


Index: FindQt4.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindQt4.cmake,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- FindQt4.cmake	20 Feb 2007 21:35:45 -0000	1.69
+++ FindQt4.cmake	1 Mar 2007 21:44:32 -0000	1.70
@@ -218,18 +218,21 @@
   FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
     "message(CMAKE_MESSAGE<$$${invar}>)")
 
+  # Invoke qmake with the tmp.pro program to get the desired
+  # information.  Use the same variable for both stdout and stderr
+  # to make sure we get the output on all platforms.
   EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
     WORKING_DIRECTORY  
     ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
     OUTPUT_VARIABLE _qmake_query_output
     RESULT_VARIABLE _qmake_result
-    ERROR_VARIABLE _qmake_error_output )
+    ERROR_VARIABLE _qmake_query_output )
   
   FILE(REMOVE_RECURSE 
     "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
 
   IF(_qmake_result)
-    MESSAGE(WARNING " querying qmake for ${invar}.  qmake reported:\n${_qmake_error_output}")
+    MESSAGE(WARNING " querying qmake for ${invar}.  qmake reported:\n${_qmake_query_output}")
   ELSE(_qmake_result)
     STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
   ENDIF(_qmake_result)



More information about the Cmake-commits mailing list