summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-03-01 21:44:32 (GMT)
committerBrad King <brad.king@kitware.com>2007-03-01 21:44:32 (GMT)
commiteb04778766cffc144c5c3629832eeb96c41acca6 (patch)
tree09df0c556f1b5df34333d6bce8d5403af76f4f12 /Modules
parentd223fc64ad09c28840406fdfc1e63e8c44146fc8 (diff)
downloadCMake-eb04778766cffc144c5c3629832eeb96c41acca6.zip
CMake-eb04778766cffc144c5c3629832eeb96c41acca6.tar.gz
CMake-eb04778766cffc144c5c3629832eeb96c41acca6.tar.bz2
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.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index f6ab115..04f62eb 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -218,18 +218,21 @@ MACRO(QT_QUERY_QMAKE outvar invar)
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)