From 51fb1c07bd9e6fcbb4204feb817fe94451593133 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 23 Jun 2015 22:54:11 +0200 Subject: Improve error reporting of query_qmake macro In case it fails, offer an error message and the attempted call, to make sure we can react accordingly. Note that the proper error argument is FATAL_ERROR, not FATAL. REVIEW: 124106 --- modules/ECMQueryQmake.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ECMQueryQmake.cmake b/modules/ECMQueryQmake.cmake index c880671f..8f4cf177 100644 --- a/modules/ECMQueryQmake.cmake +++ b/modules/ECMQueryQmake.cmake @@ -19,6 +19,7 @@ function(query_qmake result_variable qt_variable) file(TO_CMAKE_PATH "${output}" output_path) set(${result_variable} "${output_path}" PARENT_SCOPE) else() - message(FATAL "QMake call failed: ${error}") + message(WARNING "Failed call: ${QMAKE_EXECUTABLE} -query \"${qt_variable}\"") + message(FATAL_ERROR "QMake call failed: ${return_code}") endif() endfunction() -- cgit v1.2.1