From 4d7c800b7375f98b9a26d0d1612d7d927fcc6fe9 Mon Sep 17 00:00:00 2001 From: Ben Hilburn Date: Wed, 11 Dec 2013 18:10:06 -0800 Subject: Merging Philip Balister's work for ARM cross-compilation. --- host/cmake/Modules/UHDUnitTest.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'host/cmake/Modules/UHDUnitTest.cmake') diff --git a/host/cmake/Modules/UHDUnitTest.cmake b/host/cmake/Modules/UHDUnitTest.cmake index 47cddc521..76fec14b8 100644 --- a/host/cmake/Modules/UHDUnitTest.cmake +++ b/host/cmake/Modules/UHDUnitTest.cmake @@ -64,7 +64,11 @@ function(UHD_ADD_TEST test_name) list(APPEND environs "PATH=${binpath}" "${LD_PATH_VAR}=${libpath}") #generate a bat file that sets the environment and runs the test - find_program(SHELL sh) + if (CMAKE_CROSSCOMPILING) + set(SHELL "/bin/sh") + else(CMAKE_CROSSCOMPILING) + find_program(SHELL sh) + endif(CMAKE_CROSSCOMPILING) set(sh_file ${CMAKE_CURRENT_BINARY_DIR}/${test_name}_test.sh) file(WRITE ${sh_file} "#!${SHELL}\n") #each line sets an environment variable -- cgit v1.2.3