84525

Hide automatically generated CTest targets

Question:

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

<ul><li>Continuous</li> <li>ContinuousBuild</li> <li>ContinuousConfigure</li> <li>ContinuousCoverage</li> <li>ContinuousMemCheck</li> <li>ContinuousStart</li> <li>ContinuousSubmit</li> <li>ContinuousTest</li> <li>ContinuousUpdate</li> <li>Experimental</li> <li>ExperimentalBuild</li> <li>ExperimentalConfigure</li> <li>ExperimentalCoverage</li> <li>ExperimentalMemCheck</li> <li>ExperimentalStart</li> <li>ExperimentalSubmit</li> <li>ExperimentalTest</li> <li>ExperimentalUpdate</li> <li>Nightly</li> <li>NightlyBuild</li> <li>NightlyConfigure</li> <li>NightlyCoverage</li> <li>NightlyMemCheck</li> <li>NightlyStart</li> <li>NightlySubmit</li> <li>NightlyTest</li> <li>NightlyUpdate</li> </ul>

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:

<ol><li>Get CTest to not generate them in the first place.</li> <li>Delete the targets after CTest has created them.</li> <li>A setting in CLion to hide them.</li> </ol>

Answer1:

Unless you are using CDash, the solution is very simple.

In your CMakefile replace

include(CTest)

with

enable_testing()

Answer2:

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.

Recommend

  • CMake make[2]: *** No rule to make target `/path/to/uthash/utarray.h', needed by `HelloTest
  • Tell CLion to use header include path with prefix
  • Build and run project that use math.h in Clion [duplicate]
  • Double plus sign for the last line in git-diff of merge
  • Java EE 6 Login module
  • iOS two views cover exactly half of parent view
  • How do I revert sys.stdout.close()?
  • Clion & CMake. How To Add Library (*.so)
  • Eclipse dark color theme fixes
  • UIPickerView without IB?
  • Mercurial: Identify file name after rename
  • SetWindowsHookEx does not react on media keys
  • Cannot upload to OneDrive using the new SDK
  • Excel's Macro-Recorder usage
  • How to use carriage return with multiple line?
  • With Hadoop, can I create a tasktracker on a machine that isn't running a datanode?
  • Adding a button at the bottom of a table view
  • Regex thinks I'm nesting, but I'm not
  • Getting last autonumber in access
  • What is the “return” in scheme?
  • Excel - Autoshape get it's name from cell (value)
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • How to add a column to a Pandas dataframe made of arrays of the n-preceding values of another column
  • Check if a string to interpolate provides expected placeholders
  • Sending data from AppleScript to FileMaker records
  • Can I make an Android app that runs a web view in Chrome 39?
  • Weird JavaScript statement, what does it mean?
  • Delete MySQLi record without showing the id in the URL
  • GridView Sorting works once only
  • RestKit - RKRequestDelegate does not exist
  • Traverse Array and Display in markup
  • How to disable jQuery.jplayer autoplay?
  • KeystoneJS: Relationships in Admin UI not updating
  • AngularJs get employee from factory
  • Load html files in TinyMce
  • Why joiner is not used after Sequence generator or Update statergy
  • need help with bizarre java.net.HttpURLConnection behavior
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster
  • Android Heatmap on canvas or ImageView