-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
Qt Creator 15.0.1
-
None
-
5e7c9a188 (17.0), a532631e1 (17.0)
Qt Creator allows the creation of QTest project template.

But the generated CMakeLists.txt seems a bit outdated, such as, it doesn't use qt_standard_project_setup(), it uses C++ 11, it uses add_executable(), not qt_add_executable(), etc. I think this template should be reviewed and updated by experts.
cmake_minimum_required(VERSION 3.16)
project(DummyTest LANGUAGES CXX)enable_testing()
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Test)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Test)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_executable(DummyTest tst_dummytest.cpp)
add_test(NAME DummyTest COMMAND DummyTest)
target_link_libraries(DummyTest PRIVATE Qt${QT_VERSION_MAJOR}::Test)
- mentioned in
-
Page Loading...
| For Gerrit Dashboard: QTCREATORBUG-32578 | ||||||
|---|---|---|---|---|---|---|
| # | Subject | Branch | Project | Status | CR | V |
| 644490,2 | AutoTest: Provide new style cmake project files | 17.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |