Multiple projects question

Hi

I've been trying out CLion to see if we can use it at work. And have run in to an issue with how we organize our projects. We have multiple applications that share a couple of libraries. A bit like this

App1 uses library: Lib1, Lib2, Lib4
App2 uses library: Lib1, Lib3, Lib4

While its possible to build everything seperatly with CMake, I would like to have App1 and all its library project loaded in the same CLion instance, so I can edit the code in the App and Libraries at the same time. I know of the feature we you can have multiple UIs open at the same time... but that's not very convinient (we have a lot of projects and libraries). Or I guess we can have one big CMake project for each app that builds the libraries also.... but thats going to add a lot of administration. I've been using both Eclipse and Visual Studio and they both support having multiple projects loaded at the same time... so I was a bit surpised not finding this in CLion.

Have I missed something, or is this not possible in CLion?

BR,

Magnus

0

Magnus,

could you please explain why creating an aggregating CMakeLists.txt file is not suitable? What kind of administration is required?

0
Avatar
Permanently deleted user

To be honest, I'm not that familiar with CMake yet. I've mainly been  developing on Windows before and using regular makefiles on Linux, which  I find quite complicated. The way I've understood it, if I solve it  that way with multiple CMakeList files, wouldn't I have to manually create them? If so, what does CLion bring to the table? Then I can just use any editor with GDB integration.

I will experiment some more with CLion, I was just a bit surprised, since all the dev environments I've used the last 20 years have had support for multiple projects. But if CLion can add the files automatically to the correct CMakeList file if I have multiple in aggregate, then I guess that could work. Maybe then it would be good to document that for CLion for us developers that are not that experienced with CMake :).

Magnus

0

Anton,

I hear several times "to create aggregating CMakeLists.txt".

Could you please give us example how to do that?

If it is simple, then why CLion cannot do it for us? When I open new CMakeLists file I want CLion to ask 'Do you want to open that project in new window or add to current project?'


Moreover, I don't understand why you allow to create modules in IDEA for Java, why you allow to create modules for PyCharm, but not for C++?
How C++ differs from Java or Python?


For example, How to achieve  the folowing use case in CLion, which works in IDEA:
* compile the project
* svn up
* ups, some module is broken
* continue working with my module by using 'compile my module' instead of 'compile whole project'.
* IDEA allows to set dependencies between modules, when I hit 'compile my module'-> it compiles it and all dependent modules, but not that broken one

0

请先登录再写评论。