aboutsummaryrefslogtreecommitdiffstats
path: root/host/cmake/Modules/UHDUnitTest.cmake
diff options
context:
space:
mode:
authorJoerg Hofrichter <joerg.hofrichter@ni.com>2020-06-23 11:55:17 +0200
committerAaron Rossetto <aaron.rossetto@ni.com>2020-06-25 13:32:14 -0500
commite08830cbe5609645462190aa0c1a9e234353f38a (patch)
tree27d01500494dd2d469c6096b251b547f0704b78f /host/cmake/Modules/UHDUnitTest.cmake
parentafee1888dd7c2d9d95e537f505ce7ab36252763a (diff)
downloaduhd-e08830cbe5609645462190aa0c1a9e234353f38a.tar.gz
uhd-e08830cbe5609645462190aa0c1a9e234353f38a.tar.bz2
uhd-e08830cbe5609645462190aa0c1a9e234353f38a.zip
cmake: tests: Added option to use QEMU for running unittests
This is useful when cross-compiling UHD for other architectures like arm or aarch64.
Diffstat (limited to 'host/cmake/Modules/UHDUnitTest.cmake')
-rw-r--r--host/cmake/Modules/UHDUnitTest.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/host/cmake/Modules/UHDUnitTest.cmake b/host/cmake/Modules/UHDUnitTest.cmake
index f1f52addc..7a6e00178 100644
--- a/host/cmake/Modules/UHDUnitTest.cmake
+++ b/host/cmake/Modules/UHDUnitTest.cmake
@@ -42,7 +42,10 @@ function(UHD_ADD_TEST test_name)
#add_test(${ARGV})
#set_tests_properties(${test_name} PROPERTIES ENVIRONMENT "${environs}")
- if(UNIX)
+ if(ENABLE_QEMU_UNITTESTS)
+ # use QEMU emulator for executing test
+ add_test(${test_name} ${QEMU_EXECUTABLE} -L ${QEMU_SYSROOT} ${test_name})
+ elseif(UNIX)
set(LD_PATH_VAR "LD_LIBRARY_PATH")
if(APPLE)
set(LD_PATH_VAR "DYLD_LIBRARY_PATH")