Set the sysroot if cross compiling the cmake tests.

Change-Id: Iae268f30b86a67fcf978983ca9b12f850948dd24
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
bb10
Stephen Kelly 2013-04-23 11:21:57 +02:00 committed by The Qt Project
parent 839e275249
commit ecc11ccd65
1 changed files with 4 additions and 0 deletions

View File

@ -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}")