How to disable adding new files to CMakeLists.txt?

已回答

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?

0

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.

1

Aha!  Somehow I was completely overlooking that when I added the files.  Thank you!

0

请先登录再写评论。