forked from qt-creator/qt-creator
CMake: Add "test" target to cmake builds
Always show a test target for cmake projects. This will show even if there are no tests in the project. But I think it is more annoying *not* to be able to run tests via the locator when tests are available than getting an error message when attempting that with a project that does not have tests. Task-number: QTCREATORBUG-18323 Change-Id: Iba85aa868cb9bfe6c3f44a7ffff620d081d3082f Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -404,9 +404,14 @@ QString CMakeBuildStep::installTarget()
|
||||
return QString("install");
|
||||
}
|
||||
|
||||
QString CMakeBuildStep::testTarget()
|
||||
{
|
||||
return QString("test");
|
||||
}
|
||||
|
||||
QStringList CMakeBuildStep::specialTargets()
|
||||
{
|
||||
return { allTarget(), cleanTarget(), installTarget() };
|
||||
return { allTarget(), cleanTarget(), installTarget(), testTarget() };
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user