Add missing implicit dependencies to the tool tests
moc, qmake, rcc, and uic tests execute corresponding tools inside the test executables. This adds dependencies explicitly, to execute tests using _check targets, without the need to manually build dependencies. Pick-to: 6.3 6.2 Fixes: QTBUG-98576 Change-Id: I8b989276e21199b867591f7b0f6af9204695ac13 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
1ff8877ea7
commit
ba48e1b809
@ -143,3 +143,9 @@ add_custom_command(TARGET tst_moc
|
|||||||
--collect-json "@${moc_json_out}"
|
--collect-json "@${moc_json_out}"
|
||||||
COMMENT "Running moc with --collect-json"
|
COMMENT "Running moc with --collect-json"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add dependencies that are implicitly used inside the test
|
||||||
|
add_dependencies(tst_moc
|
||||||
|
Qt::qtpaths
|
||||||
|
Qt::moc
|
||||||
|
)
|
||||||
|
@ -1,9 +1,3 @@
|
|||||||
# Generated from qmake.pro.
|
|
||||||
|
|
||||||
#####################################################################
|
|
||||||
## tst_qmake Test:
|
|
||||||
#####################################################################
|
|
||||||
|
|
||||||
# Collect test data
|
# Collect test data
|
||||||
file(GLOB_RECURSE test_data_glob
|
file(GLOB_RECURSE test_data_glob
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
@ -17,8 +11,21 @@ qt_internal_add_test(tst_qmake
|
|||||||
TESTDATA ${test_data}
|
TESTDATA ${test_data}
|
||||||
)
|
)
|
||||||
|
|
||||||
## Scopes:
|
set(dependencies
|
||||||
#####################################################################
|
Qt::moc
|
||||||
|
Qt::qmake
|
||||||
#### Keys ignored in scope 2:.:.:qmake.pro:WIN32:
|
)
|
||||||
# testcase.timeout = "900"
|
if(TARGET Qt::Gui)
|
||||||
|
list(APPEND dependencies Qt::Gui)
|
||||||
|
endif()
|
||||||
|
if(TARGET Qt::Widgets)
|
||||||
|
list(APPEND dependencies Qt::Widgets)
|
||||||
|
endif()
|
||||||
|
if(TARGET Qt::rcc)
|
||||||
|
list(APPEND dependencies Qt::rcc)
|
||||||
|
endif()
|
||||||
|
if(TARGET Qt::uic)
|
||||||
|
list(APPEND dependencies Qt::uic)
|
||||||
|
endif()
|
||||||
|
# Add dependencies that are implicitly used inside the test
|
||||||
|
add_dependencies(tst_qmake ${dependencies})
|
||||||
|
@ -63,3 +63,8 @@ qt_internal_add_resource(tst_rcc "size-1"
|
|||||||
FILES
|
FILES
|
||||||
${size-1_resource_files}
|
${size-1_resource_files}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add dependencies that are implicitly used inside the test
|
||||||
|
add_dependencies(tst_rcc
|
||||||
|
Qt::rcc
|
||||||
|
)
|
||||||
|
@ -8,3 +8,8 @@ qt_internal_add_test(tst_uic
|
|||||||
SOURCES
|
SOURCES
|
||||||
tst_uic.cpp
|
tst_uic.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Add dependencies that are implicitly used inside the test
|
||||||
|
add_dependencies(tst_uic
|
||||||
|
Qt::uic
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user