With the Safe Delete refactoring, you can safely remove files and symbols from the source code.
Select the item to be deleted.
Press Alt+Delete or callfrom the main menu.
In the Safe Delete dialog, select the necessary options and click OK:
If the refactoring is potentially unsafe, the Usages Detected dialog opens.
View Usages. Click this button to see where in your code the item you are about to delete is used:
Analyze your code and make the necessary corrections. Click Do Refactor when ready.
Delete Anyway. Click this button to delete the item without checking the usages.
Safe Delete for files in CMake projects
When you delete files referenced in CMake commands, CLion performs Safe Delete.
Safe Delete for files and their references in CMakeLists.txt is supported for the following commands: