Add new files with CLion and cmake


It’s probably something very stupid because I can’t find any post related to this.
When I want to add a new file to one of the cinder samples on Linux with CLion there is no target available.
I can offcourse add the file manually to CMakeLists.txt but it should be possible to have it done automatically no?

Any tips?

Was testing with VS2019 today and it wanted to add the files to the cinderMakeApp.cmake.
I think most IDE’s or confused with the cinderMakeApp function (which is great btw).
Will just add the files manually to the cmakelist.txt which is not a big deal but since I’m a CMake noob I wanted to know if there where more automated ways for adding a lot of files.

FWIW I manually create (from terminal) and then add .cpp / .h files even when using Visual Studio, just to make sure they end up in the right place and configured correctly. I’ve had issues with most IDEs I’ve used around adding source files from the editor itself.


Thx Rich!
Your feedback is very valuable since you did a lot of work on the cmake cinder part.

1 Like