Hi Michał,

I think it’s a good idea to generate the CMakeLists.txt for a target.
I’m using CLion for a while now and the debugging also works fine!

I also modified the newt tool to accept an additional option „-m" for the build 
command to generate the  CMakeLists.txt.
That was the least possible effort but sometimes I forget the clean before the 
build.
Your approach looks much better!

Maybe it makes sense to provide a cmake.yml to tweak the generation a bit,
something like the c99 or c11 could be configured in it.

Regards
Alfred
 

EDV-Beratung Schilken
[email protected]
www.schilken.de
mobil: +49 178 1475677

> Am 14.08.2017 um 12:43 schrieb Michał Narajowski 
> <[email protected]>:
> 
> 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