How to disable adding new files to CMakeLists.txt?
Answered
I have a CMake project, and every time I create a new file, CLion attempts to add that file to my sources list in CMakeLists.txt. However the project is quite complex and CLion often doesn't put it in the correct place. I've been unable to find a setting for this feature. Is there a way to turn it off?
Please sign in to leave a comment.
Hello!
CLion tries to add the file to a target if the “Add to targets” option is selected in the “New C/C++ Source File” dialog- https://www.jetbrains.com/help/clion/managing-cmake-project-files.html#add-new-files. Please uncheck the option.
Aha! Somehow I was completely overlooking that when I added the files. Thank you!