summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-02-19 18:44:30 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-02-19 18:44:30 (GMT)
commit71e0fcb806b83ac909df61a06fb64aea0f25b26a (patch)
tree644490577fde9a292322e96a5e22100b389a050d /Modules
parent303048d3dce5044b14220af742bf3156b484a882 (diff)
downloadCMake-71e0fcb806b83ac909df61a06fb64aea0f25b26a.zip
CMake-71e0fcb806b83ac909df61a06fb64aea0f25b26a.tar.gz
CMake-71e0fcb806b83ac909df61a06fb64aea0f25b26a.tar.bz2
BUG: fix for bug 4464 handle qmake errors better
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindQt4.cmake12
1 files changed, 9 insertions, 3 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index c48915f..5b277d9 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -222,12 +222,18 @@ MACRO(QT_QUERY_QMAKE outvar invar)
WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
OUTPUT_VARIABLE _qmake_query_output
- ERROR_VARIABLE _qmake_query_output )
-
+ RESULT_VARIABLE _qmake_result
+ ERROR_VARIABLE _qmake_error_output )
+
FILE(REMOVE_RECURSE
"${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
- STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
+ IF(_qmake_result)
+ MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_error_output}")
+ ELSE(_qmake_result)
+ STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
+ ENDIF(_qmake_result)
+
ENDMACRO(QT_QUERY_QMAKE)
# check for qmake