From ecc11ccd6598e868193863d82c7034bfbb2c1fe6 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Tue, 23 Apr 2013 11:21:57 +0200 Subject: Set the sysroot if cross compiling the cmake tests. Change-Id: Iae268f30b86a67fcf978983ca9b12f850948dd24 Reviewed-by: Volker Krause Reviewed-by: Stephen Kelly --- src/corelib/Qt5CTestMacros.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib') diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake index 126a348b47..51537a3904 100644 --- a/src/corelib/Qt5CTestMacros.cmake +++ b/src/corelib/Qt5CTestMacros.cmake @@ -38,6 +38,10 @@ foreach(module ${CMAKE_MODULES_UNDER_TEST}) ) endforeach() +if(CMAKE_CROSSCOMPILING AND CMAKE_FIND_ROOT_PATH) + list(APPEND BUILD_OPTIONS_LIST "-DCMAKE_CXX_LINK_FLAGS=--sysroot=\"${CMAKE_FIND_ROOT_PATH}\"") +endif() + macro(expect_pass _dir) string(REPLACE "(" "_" testname "${_dir}") string(REPLACE ")" "_" testname "${testname}") -- cgit v1.2.3