diff options
author | Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> | 2016-07-15 18:09:24 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-08-10 15:42:29 +0000 |
commit | 0eff800e81f3e7f803dffd77737faaed73002ac8 (patch) | |
tree | af34639c0caf41335c9d7359549f83cfe9ca6380 /mkspecs/features/configure_base.prf | |
parent | 62838f07d4e4e8ae578801167b11e02480d34daa (diff) |
add support for returning the command's exit status to $$system()
... and make use of it in qtRunLoggedCommand().
Change-Id: I242dfde344f555800cef1f55d3cb85418a93277f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'mkspecs/features/configure_base.prf')
-rw-r--r-- | mkspecs/features/configure_base.prf | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mkspecs/features/configure_base.prf b/mkspecs/features/configure_base.prf index fd1730741a..3397a7703e 100644 --- a/mkspecs/features/configure_base.prf +++ b/mkspecs/features/configure_base.prf @@ -32,16 +32,13 @@ defineTest(qtLog) { defineTest(qtRunLoggedCommand) { qtLog($$1) - write_file($${QMAKE_CONFIG_LOG}.part, "") - result = false - system("$$1 > \"$${QMAKE_CONFIG_LOG}.part\" 2>&1"): result = true - - output = $$cat($${QMAKE_CONFIG_LOG}.part, blob) + output = $$system("$$1 2>&1", blob, result) write_file($${QMAKE_CONFIG_LOG}, output, append) $$QMAKE_CONFIG_VERBOSE: log($$output) - return($$result) + !equals(result, 0): return(false) + return(true) } isEmpty(QMAKE_CONFIG_TESTS_DIR): QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests |