Skip emebedding test data when there is no target
On android test data is embedded into to the binary via resources. This will not work with sourceless tests such as the qml only test cases. Change-Id: I3ecf28223b3c7c6dae4ca3f15519adc028082598 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CMake Build Bot
This commit is contained in:
parent
8b800dc384
commit
acdc5dfaee
@ -2322,6 +2322,8 @@ function(add_qt_test name)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(builtin_testdata)
|
if(builtin_testdata)
|
||||||
|
# Safe guard against qml only tests, no source files == no target
|
||||||
|
if (TARGET "${name}")
|
||||||
target_compile_definitions("${name}" PRIVATE BUILTIN_TESTDATA)
|
target_compile_definitions("${name}" PRIVATE BUILTIN_TESTDATA)
|
||||||
|
|
||||||
foreach(testdata IN LISTS arg_TESTDATA)
|
foreach(testdata IN LISTS arg_TESTDATA)
|
||||||
@ -2341,6 +2343,7 @@ function(add_qt_test name)
|
|||||||
FILES ${builtin_files}
|
FILES ${builtin_files}
|
||||||
BASE ${CMAKE_CURRENT_SOURCE_DIR})
|
BASE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
# Install test data
|
# Install test data
|
||||||
file(RELATIVE_PATH relative_path_to_test_project
|
file(RELATIVE_PATH relative_path_to_test_project
|
||||||
|
Loading…
x
Reference in New Issue
Block a user