diff options
author | Christian Stenger <christian.stenger@qt.io> | 2021-09-13 11:05:40 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2021-09-13 09:29:05 +0000 |
commit | 7e965629b0bbd463c70f561f6c4bddccd2fd9ae4 (patch) | |
tree | d42b8db42aae65569b6ccf97d69bedde7fcdda82 | |
parent | f6f2ffde4e4c49834266210d8f9778660fca28f9 (diff) |
AutoTest: Fix cmake wizardv5.0.1
If ctest is going to be used we need to enable testing. Do it globally
instead of per framework which already led to forgot it.
Change-Id: Ifdb0e94708a26e2496d708361d5b8163aa2912ad
Reviewed-by: David Schulz <david.schulz@qt.io>
-rw-r--r-- | share/qtcreator/templates/wizards/autotest/files/tst.txt | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/share/qtcreator/templates/wizards/autotest/files/tst.txt b/share/qtcreator/templates/wizards/autotest/files/tst.txt index 516567cc63..7eb0985b74 100644 --- a/share/qtcreator/templates/wizards/autotest/files/tst.txt +++ b/share/qtcreator/templates/wizards/autotest/files/tst.txt @@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.5) project(%{TestCaseName} LANGUAGES CXX) +enable_testing() + @if "%{TestFrameWork}" == "QtTest" @if "%{RequireGUI}" == "true" find_package(QT NAMES Qt6 Qt5 COMPONENTS Gui Test REQUIRED) @@ -19,7 +21,6 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -enable_testing() add_executable(%{TestCaseName} %{TestCaseFileWithCppSuffix}) add_test(NAME %{TestCaseName} COMMAND %{TestCaseName}) @@ -43,7 +44,6 @@ set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -enable_testing() # no need to copy around qml test files for shadow builds - just set the respective define add_definitions(-DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}") @@ -105,7 +105,6 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD_REQUIRED ON) -enable_testing() add_executable(%{TestCaseName} %{MainCppName}) add_test(NAME %{TestCaseName} COMMAND %{TestCaseName}) |