summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-09-21 16:05:46 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-24 18:01:05 +0200
commit3e9f27929004b7a5f44f14068b521e0d90c7b9c2 (patch)
tree26a9ee6bac93a25c7294e79dfa6e72476a2260c4
parentf03ef8d8f45e898236a9b949cdfa41c89c6c6b76 (diff)
Specify the --build-config when invoking ctest.
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>
-rw-r--r--src/corelib/Qt5CTestMacros.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/Qt5CTestMacros.cmake b/src/corelib/Qt5CTestMacros.cmake
index 3c279ee138..3d1b3b3191 100644
--- a/src/corelib/Qt5CTestMacros.cmake
+++ b/src/corelib/Qt5CTestMacros.cmake
@@ -16,6 +16,7 @@ macro(expect_pass _dir)
--build-and-test
"${CMAKE_CURRENT_SOURCE_DIR}/${_dir}"
"${CMAKE_CURRENT_BINARY_DIR}/${_dir}"
+ --build-config "${CMAKE_BUILD_TYPE}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${_dir}
@@ -51,6 +52,7 @@ macro(expect_fail _dir)
--build-and-test
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}"
"${CMAKE_CURRENT_BINARY_DIR}/failbuild/${_dir}/build"
+ --build-config "${CMAKE_BUILD_TYPE}"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
--build-project ${_dir}