Forward the CMAKE_TOOLCHAIN_FILE to tests.

A Toolchain file must be supplied to cmake to cross compile. Forward
that to tests so that they can be built too.

Change-Id: Ie15190ff1d1f554ce436b7cb4d37a177a7e17e56
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
This commit is contained in:
Stephen Kelly 2012-08-28 10:13:09 +02:00 committed by Qt by Nokia
parent e7dfdb1211
commit f92f5f3ff0

View File

@ -8,7 +8,7 @@ macro(expect_pass _dir)
"${CMAKE_CURRENT_BINARY_DIR}/${_dir}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-options "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
--build-options "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
)
endmacro()
@ -42,6 +42,6 @@ macro(expect_fail _dir)
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-options "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
--build-options "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}" "-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE}"
)
endmacro()