本文介绍了隐藏自动生成的CTest目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在CLion中使用CMake和CTest。烦人的是,CTest生成了大量我不关心的目标:
I'm using CMake and CTest in CLion. Annoyingly, CTest generates a load of targets that I don't care about:
- 连续
- ContinuousBuild
- ContinuousConfigure
- ContinuousCoverage
- ContinuousMemCheck
- ContinuousStart
- ContinuousSubmit
- ContinuousTest
- ContinuousUpdate
- 实验性
- ExperimentalBuild
- ExperimentalConfigure
- ExperimentalCoverage
- ExperimentalMemCheck
- ExperimentalStart
- ExperimentalSubmit
- ExperimentalTest
- ExperimentalUpdate
- Nightly
- NightlyBuild
- NightlyConfigure
- NightlyCoverage
- NightlyMemCheck
- NightlyStart
- NightlySubmit
- NightlyTest
- NightlyUpdate
- Continuous
- ContinuousBuild
- ContinuousConfigure
- ContinuousCoverage
- ContinuousMemCheck
- ContinuousStart
- ContinuousSubmit
- ContinuousTest
- ContinuousUpdate
- Experimental
- ExperimentalBuild
- ExperimentalConfigure
- ExperimentalCoverage
- ExperimentalMemCheck
- ExperimentalStart
- ExperimentalSubmit
- ExperimentalTest
- ExperimentalUpdate
- Nightly
- NightlyBuild
- NightlyConfigure
- NightlyCoverage
- NightlyMemCheck
- NightlyStart
- NightlySubmit
- NightlyTest
- NightlyUpdate
这些都显示在CLion中。我肯定会同意的,这很令人讨厌。有解决方案,将其删除吗?我愿意接受任何解决方案:
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:
- 让CTest不在第一时间生成它们。
- 在CTest创建目标之后删除目标。
- CLion中的设置以隐藏目标。
推荐答案
我不确定100%可行的解决方案是转到CLion中的Run-> Edit Configurations ...,然后删除所有不需要的目标。
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.
重新加载CMake配置和清理干净
似乎仍然可以幸免。
This seems to survive reloading the CMake configuration, and make clean
.
这篇关于隐藏自动生成的CTest目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!