JetBrains IDE CLion build and debug

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 338
Joined: Sun Jun 20, 2010 6:00 pm

JetBrains IDE CLion build and debug

Post by mcarans »

JetBrains IDE CLion is cross platform and supports Objective-C. It looks rather nice to load the project up and view it all in an IDE.
Image

It shows all the Git submodules:
Image

I have got Oolite to build on the command line following the instructions. One library is missing from the Ubuntu instructions: libpng-dev.

It would be great to get it to build and debug in the IDE. I can only get it to build if I source the GNUStep.sh file before launching CLion otherwise I get errors while building like:
*** No rule to make target '/common.make'. Stop.

It's decades since I did any C++ but I remember that makefiles could get complicated. I could not figure out how to get the makefile to source the GNUStep.sh file or to get CLion to execute GNUStep.sh before launching one of the many make targets it autodetected like "all".
Image

Does anyone have any idea how to fix this? If not, I can make a script to launch the IDE after sourcing.

I was wondering if moving to a more modern system like CMake would make it easier to understand the build process and get it working in CLion and other IDEs.
User avatar
hiran
Theorethicist
Posts: 2472
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: JetBrains IDE CLion build and debug

Post by hiran »

It is good to have a platform agnostic professional IDE.
If that work it should get a mention in the developer's corner in the wiki.

For the build tool: I guess the makefile complexity is already there. Both a Makefile and a Gnumakefile are in effect, and they may spawn more such files IIRC.
If someone can cleanup here that would be an important step.
Sunshine - Moonlight - Good Times - Oolite
mcarans
---- E L I T E ----
---- E L I T E ----
Posts: 338
Joined: Sun Jun 20, 2010 6:00 pm

Re: JetBrains IDE CLion build and debug

Post by mcarans »

hiran wrote: Thu Jul 10, 2025 4:27 pm
It is good to have a platform agnostic professional IDE.
If that work it should get a mention in the developer's corner in the wiki.

For the build tool: I guess the makefile complexity is already there. Both a Makefile and a Gnumakefile are in effect, and they may spawn more such files IIRC.
If someone can cleanup here that would be an important step.
I feel like this links with the library update work going on and in particular, the removal of custom builds of libraries like espeak. These steps would significantly reduce technical debt and increase maintainability. I just hope that there's a way to use more current build tools. This thread suggests it is possible but not straightforward: https://mail.gnu.org/archive/html/discu ... 00008.html
Post Reply