How to completely delete a project in CLion

Somehow my project has been corrupted and I cannot build a target as CLion tells me "Product not found for target ..." (for every target). The target is there because the Build All function still works and the targets are build, but I can't select them in the edit configuration dialog for build/run

I've wiped the cache, removed the build tree form ~/Library/Caches/... and manually deleted as many files as I can - but I'm terrified of deleting info related to other projects that are not corrupted. If I try to recreate/reimport the project, it picks up the same project name from cmake and re-finds all the information about the old project. There does not appear to be a way of removing a project and starting afresh.

I manaully deleted the target from the config dialog, and now they're gone and I can't get them back.

My only solution is to rename the project in CMakeLists and create it from new with the new name.Surely there's a better way?

5 comments
Comment actions Permalink

Hi John!

Have you tried to remove the hidden .idea folder in the project root and reopen CMakeLists.txt after that? It will wipe the store project model and data. Does that help?

0
Comment actions Permalink

Removing the .idea folder helped. Thanks. Now the targets have all reappeared in the "edit configurarions" dialog. I can select the libraries and build them, but the applications/exes just give the message "Error: Product not found for target XXX (Debug)".

If I attempt to build the, then the edit configurarions dialog pops back up.

 

0
Comment actions Permalink

I only now have noticed that in the cmake output window I get a load of these messages. It explains why I have the problem, but I'm not sure how to fix it.

Warning:Configuration Debug
Unable to determine product file path for target TestMeshPartitionFilter (Debug). Running and debugging will be unavailable.
Warning:Configuration Debug
Unable to determine product file path for target TestParticlePartitionFilter (Debug). Running and debugging will be unavailable.
Warning:Configuration Debug
Unable to determine product file path for target TestParticlePartitionWeightCount (Debug). Running and debugging will be unavailable.
Warning:Configuration Release
Unable to determine product file path for target TestMeshPartitionFilter (Release). Running and debugging will be unavailable.

 

0
Comment actions Permalink

Could you please specify if you have removed .idea folder and the build tree form ~/Library/Caches/... simultaneously? If not please do that. Does that help?

0
Comment actions Permalink

yes, of course, I deleted the .idea and the cache directories simultaneously.

The error remains. (I just tried deleting everything again)

Warning:Configuration Debug
Unable to determine product file path for target TestMeshPartitionFilter (Debug). Running and debugging will be unavailable.
Warning:Configuration Debug
Unable to determine product file path for target TestParticlePartitionFilter (Debug). Running and debugging will be unavailable.
Warning:Configuration Debug
Unable to determine product file path for target TestParticlePartitionWeightCount (Debug). Running and debugging will be unavailable.
Warning:Configuration Release
Unable to determine product file path for target TestMeshPartitionFilter (Release). Running and debugging will be unavailable.
Warning:Configuration Release
Unable to determine product file path for target TestParticlePartitionFilter (Release). Running and debugging will be unavailable.
Warning:Configuration Release
Unable to determine product file path for target TestParticlePartitionWeightCount (Release). Running and debugging will be unavailable.
Warning:Configuration RelWithDebInfo
Unable to determine product file path for target TestMeshPartitionFilter (RelWithDebInfo). Running and debugging will be unavailable.
Warning:Configuration RelWithDebInfo
Unable to determine product file path for target TestParticlePartitionFilter (RelWithDebInfo). Running and debugging will be unavailable.
Warning:Configuration RelWithDebInfo
Unable to determine product file path for target TestParticlePartitionWeightCount (RelWithDebInfo). Running and debugging will be unavailable.
Warning:Configuration MinSizeRel
Unable to determine product file path for target TestMeshPartitionFilter (MinSizeRel). Running and debugging will be unavailable.
Warning:Configuration MinSizeRel
Unable to determine product file path for target TestParticlePartitionFilter (MinSizeRel). Running and debugging will be unavailable.
Warning:Configuration MinSizeRel
Unable to determine product file path for target TestParticlePartitionWeightCount (MinSizeRel). Running and debugging will be unavailable.

0

Please sign in to leave a comment.