c++cmakeclionctest

Hide automatically generated CTest targets


I'm using CMake and CTest in CLion. Annoyingly, CTest generates a load of targets that I don't care about:

These all show up in CLion. Quite annoying as I'm sure you'll agree. Is there solution to remove them? I'm open to any solution:

  1. Get CTest to not generate them in the first place.
  2. Delete the targets after CTest has created them.
  3. A setting in CLion to hide them.

Solution

  • A possible solution that I'm not sure works 100% is to go to Run->Edit Configurations... in CLion and simply delete all the targets you don't want.

    This seems to survive reloading the CMake configuration, and make clean.