Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Antwort: [Newsletter] Re: CMake support in Eclipse CDT

You mean cmake --trace doesn’t show it if add_executable is in a macro? And grep was just a quick thing I did to show we can pull the add_executable’s out if they do show up there. The real code would do this in Java.

At any rate, we’re still waiting to see what code get’s contributed. I’m not planning on working on anything new for CMake for a few weeks so it’s wide open, whatever you want to work on. I have place TODO’s through the plug-ins where I think things need to plug-in. Again, if you have any questions about what the code is trying to do please ask.

Thanks,
Doug.

From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Axel Müller <axel.carl.mueller@xxxxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Wednesday, December 9, 2015 at 4:54 AM
To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Antwort: [Newsletter] Re: CMake support in Eclipse CDT

Hi Doug,

I would not try to parse the CMakeLists.txt files to get the binaries. Just looking for "add_executable" commands might not be sufficient. E.g. in our company we have defined a CMake macro around the add_executable command. Thus, your search would find nothing. And the grep command is not available on Windows.

   Axel

2015-12-07 22:55 GMT+01:00 Doug Schaefer <dschaefer@xxxxxxx>:
This worked OK:

 Dougs-Machine:default dschaefer$ cmake --trace ../.. 2>&1 | grep add_executable

/Users/dschaefer/workspaces/ide/.eclipseTest/CMakeDemo/CMakeLists.txt(3):  add_executable(CMakeDemo src/main.cpp )


Anyway, that’s not really important to start. We have the project registered as a launch descriptor which is enough for the build button to work on the launch bar to build the project.

What needs to be done next?

Doug.

From: <cdt-dev-bounces@xxxxxxxxxxx> on behalf of Alexander Neundorf <neundorf@xxxxxxx>
Reply-To: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Date: Monday, December 7, 2015 at 4:25 PM
To: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Antwort: [Newsletter] Re: CMake support in Eclipse CDT

On Monday, December 07, 2015 21:46:28 Martin Weber wrote:

> Am Sonntag, 6. Dezember 2015, 20:25:18 schrieb Doug Schaefer:

> ...

>

> > >> In the cmake4cdt plugin, I use the output of cmake

> > >> -DCMAKE_EXPORT_COMPILE_COMMANDS=on to feed the include paths into the

> > >> indexer. I just checked that cmake also produces the

> > >>

> > >>compile_commands.json

> > >>

> > >> file when using the ninja generator (at least on linux).

> > >

> > >AFAIK, compile_commands.json is written when the cmake-makefle generator

> > >or

> > >ninja-generators is used. Not sure whether the file is written when the

> > >mingw,

> > >msys or cygwin generator is used.

> >

> > We¹re at the point now that we should probably find out exactly where it¹s

> > generated or not.

>

> Generated with the UnixMakefiles and Ninja generator only, according to [1].

> Cmake on windows provides a mingw, msys, UnixMakefiles (for cywin), nmake

> and ninja buildscript generator [2].

 

The variable CMAKE_EXPORT_COMPILE_COMMANDS is used in

void cmMakefileTargetGenerator::WriteObjectBuildFile(...), which should be used by all Makefile generators, on all platforms.

(same for ninja)

 

Alex

 


_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev



--
Dr. Axel Müller
Lorbeerweg 8
76149 Karlsruhe

Back to the top