Hi,

I recently saw a JIRA ticket MYNEWT-120 about support for generating
IDE project files and decided to try to integrate CMake files
generation into newt. CMake can generate makefiles, Eclipse project
files, Sublime Text project files and more. And it is supported by
CLion IDE and recently by Visual Studio. An additional motivation was
that Eclipse (which I currently use) is very slow when using build
output parser.

I submitted a WIP code for this functionality
(https://github.com/apache/mynewt-newt/pull/88). It allows you to
generate a CMakeLists.txt file for a specified target with a command:
"newt target cmake <target>". Suggestions regarding command naming and
code placement are welcome.

Right now only compilation is supported and it's not yet 100% the same
as in "newt build" but it's close.

I tried to use CLion with this functionality and it works pretty well.
I can compile, jump to definitions, find usages, jump to includes etc.
Also, the appropriate syscfg.h is included. I can change the target by
running the "newt tagret cmake" and then hitting "Reload CMake" in
CLion.

I also tried using it with Eclipse. Generated Eclipse project works
ok, you can compile, jump to definitions and all that. Only the target
change part is trickier. I had to close, reopen project (not Eclipse,
just the project) and reindex files to be able to jump to appropriate
syscfg.h.

Let me know what you think about it and where can we go next.

BR
Michał Narajowski

Reply via email to