summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5CTestMacros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Specify the --build-config when invoking ctest.Stephen Kelly2012-09-241-0/+2
| | | | | | | | | | | | | | | | Otherwise we get strange build errors by attempting to build an project in debug mode against a release-mode Qt: http://testresults.qt-project.org/ci/QtBase_master_Integration/build_03955/win32-msvc2010_Windows_7/log.txt.gz (grep for MSVCRTD) The CMAKE_BUILD_TYPE variable is always specified by the ctest_testcase driver as either Debug or Release. Change-Id: Ia5af7f0c31550b92679a3190e07b4e5c4ea638c6 Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Pass the unmodified directory/project name to build-project.Stephen Kelly2012-09-241-2/+2
| | | | | | | | | | | The result of replacements for special characters should not be used here. CTest needs the replacements for the test names, but requires the argument to the project() command to match the argument to ctest --build-project. Task-number: QTBUG-27087 Change-Id: I4ff7a7e00ddb65ab0c0f2305901e1d03f46e07d1 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't append _build to the directory name of tests expected to fail.Stephen Kelly2012-09-241-1/+1
| | | | | | | | | | | | | The name passed to the project() command must be the same as the argument to ctest --build-project. Initially I had appended _build to disambiguate the generated project from the project under test, but that is not needed anyway as the project under test is self-contained, so it's ok. Task-number: QTBUG-27087 Change-Id: I648d57271529d4e8d308ff60b81419ade29b2e44 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Specify the project name when adding a test.Stephen Kelly2012-09-101-0/+2
| | | | | | | | | | | | | On Windows, with the devenv makecommand, this seems to be necessary. With msbuild it is not needed, nor with nmake, but it is no harm anyway. This is also what CMake does in its unit tests. Change-Id: I45f867e699c28a43ee607b47db108021fc7fef8b Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Don't set empty CMAKE_TOOLCHAIN_FILE or CMAKE_BUILD_TYPEStephen Kelly2012-08-311-2/+12
| | | | | | | | | | | | | | | The CMake Visual Studio 10 generator generates an include() for the empty CMAKE_TOOLCHAIN_FILE, causing the errors in the bug. There may be other remaining errors to cause the Windows CMake build to fail with that generator, but this patch is an improvement anyway - there is no point in setting empty strings as values for those variables. Task-number: QTBUG-27087 Change-Id: I68cce9e3dce07835db5f42777ac02d440f90f967 Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Forward the CMAKE_TOOLCHAIN_FILE to tests.Stephen Kelly2012-08-281-2/+2
| | | | | | | | 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>
* Fix unit tests when CMAKE_PREFIX_PATH env var is not set.Stephen Kelly2012-07-111-0/+3
| | | | | | | | | | | | Tests which are expected to not build need to get a way to find the Qt 5 config packages. Because they use try_compile, there is no way to pass the contents to it. Work around that by generating a file containing the prefix which the tests will include. Change-Id: If43080c241539e4af5fe1c183e7da72066278b73 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Forward the CMAKE_PREFIX_PATH to invoked tests.Stephen Kelly2012-07-031-2/+2
| | | | | Change-Id: I5166fb39dcf3ab660c971c4c68b714f534de40cb Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Move the macros for invoking ctest to a shared location.Stephen Kelly2012-07-031-0/+44
They are still internal, but all Qt5 modules will be able to use them then. Change-Id: I42ab656115b0976ca959293dfd664ec071f35dbf Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>