From f37a917e9ae8f50864fdbb00c828daba2fc54364 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Tue, 28 Dec 2021 16:56:47 +0100 Subject: cmake: Disable QtTest discovery when cross compiling. Change-Id: I46e2ad16f592f3adc9f01347e9fcda451c0b3a26 --- utils/cmake/QtTest.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/cmake/QtTest.cmake b/utils/cmake/QtTest.cmake index d967ffd960..4214c7ddc3 100755 --- a/utils/cmake/QtTest.cmake +++ b/utils/cmake/QtTest.cmake @@ -86,6 +86,7 @@ The main function is :command:`qtest_discover_tests`. #]=======================================================================] function(qtest_discover_tests TARGET) +if(NOT CMAKE_CROSSCOMPILING) cmake_parse_arguments( "" "" @@ -120,6 +121,9 @@ function(qtest_discover_tests TARGET) set_property(DIRECTORY APPEND PROPERTY TEST_INCLUDE_FILES "${ctest_include_file}" ) +else() + message("-- Cross compiling, discovering unit tests disabled.") +endif() endfunction() -- cgit v1.2.3