ymoreau
ymoreau

Reputation: 4036

CMake in QtCreator 4.3 shows many automatic targets, how to remove/hide them?

I just switched to the last version of QtCreator (4.3.1) and the project explorer now shows many targets like ContinuousBuild, ContinuousConfigure, NightlyBuild, ExperimentalCoverage etc.

How can I remove all of these (or at least hide them) ?
I don't even know where this is generated in CMake.

Seems to be related to this question Hide automatically generated CTest targets except that I am not using CLion.

Upvotes: 1

Views: 679

Answers (1)

skypjack
skypjack

Reputation: 50548

You are probably using somewhere:

include(CTest)

According to the documentation:

Configure a project for testing with CTest/CDash

All those targets are pulled in by the combination of the two, CTest and CDash (almost all of them are due to the latter actually).
If you don't know why they are there and for what they can be used, probably you are using the wrong command.

If all what you want is to use only CTest, add tests with add_test and run them with make test, replace the line above with this one:

enable_testing()

The documentation is quite clear indeed:

Enable testing for current directory and below.

Clean up the build directory and run cmake from scratch from within QtCreator. All the targets you mentioned should disappear.


I had exactly the same problem in a project of mine when I updated QtCreator a couple of months ago. You can see in the history of the project the commit that solved the issue. Pretty short indeed.

Upvotes: 2

Related Questions