Configure CLion so it doesn't modify "CMakeLists.txt" ?
Hello,
I started to use Clion and I heavily use the full remote mode. For information, I wrote a document that explains how to use CLion with 2 (VirtualBox) virtual machines :
https://github.com/denis-beurive/clion-full-remote-mode
I am quite happy... but CLion has an annoying behaviour. It always updates the file "CMakeLists.txt" upon various events, such as the creation of a new source file.
For example, when I create a new source file, CLion will declare the new file in the file "CMakeLists.txt". However, it declares it at the wrong place. And that's normal : my building rules are quite complex. I build several libraries, several executables, including many unit tests executables. CLion cannot be cleaver enough to know where the new file should be included within the "CMakeLists.txt".
This, my question is :
is it possible to tell CLion not to modify the file "CMakeLists.txt" ?
Thanks,
Denis
Please sign in to leave a comment.
Hello!
>It always updates the file "CMakeLists.txt" upon various events, such as the creation of a new source file.
This should happen only if you check the Add to targets box when create a file using "New | C/C++ Source File":
Is this checkbox is cleared, CLion shouldn't update the CMakeLists.txt.
And thanks for sharing the document!
Just in case, you don't need to create deployment configurations manually - CLion creates a deployment configuration automatically when a "Remote Host" toolchain is created.
Hello,
Thanks for the response. It works. I'll update my document in order to include your responses.
Regards.
Denis