diff options
author | Kevin Funk <kevin.funk@kdab.com> | 2021-01-15 10:44:42 +0100 |
---|---|---|
committer | Kevin Funk <kevin.funk@kdab.com> | 2021-01-20 08:31:04 +0100 |
commit | 9ff448b6db1642faf052a3be26c09c665dd84800 (patch) | |
tree | b1b7899019bd56ed42334ff4a83d12767a051539 /cmake | |
parent | 96e9c8cc8aae718942f79ac98e775f06501b0e25 (diff) |
cmake: Bail out in case syncqt failed to run
Make sure to react on failed syncqt runs during the CMake run.
CMake will now report something along this:
```
syncqt couldn't parse .../qt5/qtbase/sync.profile: Can't modify modulus (%) in scalar assignment at .../qt5/qtbase/sync.profile line 25, near ");"
CMake Error at qtbase/cmake/QtModuleHelpers.cmake:192 (message):
Failed to run syncqt, return code: 255
```
Change-Id: I575a5fc926c547b6b633583e5d675f7e35beb734
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/QtModuleHelpers.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/QtModuleHelpers.cmake b/cmake/QtModuleHelpers.cmake index 26b27bbe63..834c2ec73e 100644 --- a/cmake/QtModuleHelpers.cmake +++ b/cmake/QtModuleHelpers.cmake @@ -201,7 +201,10 @@ function(qt_internal_add_module target) -builddir "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}") message(STATUS "Running syncqt for module: '${module_include_name}' ") - execute_process(COMMAND ${syncqt_full_command}) + execute_process(COMMAND ${syncqt_full_command} RESULT_VARIABLE syncqt_ret) + if(NOT syncqt_ret EQUAL 0) + message(FATAL_ERROR "Failed to run syncqt, return code: ${syncqt_ret}") + endif() set_target_properties("${target}" PROPERTIES INTERFACE_MODULE_HAS_HEADERS ON |