Skip to main content

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


From: Alexander Neundorf <neundorf@xxxxxxx>
Date: Friday, October 9, 2015 at 4:46 PM
To: Doug Schaefer <dschaefer@xxxxxxx>
Cc: "cdt-dev@xxxxxxxxxxx" <cdt-dev@xxxxxxxxxxx>
Subject: Re: [cdt-dev] Antwort: CMake support in Eclipse CDT

On Friday, October 09, 2015 20:33:39 Doug Schaefer wrote:

> I’ll have to top post this since Outlook is mucking up the lines.

>

> Essentially I don’t want CMake to generate .project and .cproject files. I

 

I understand this.

Still this is useful in the case that a CDT-user wants to use CDT on a CMake-based project which does not come with a .project file, and where the project may not allow to check in an IDE project file into their version control.

Or should the "Import cmake project" take care of this ?


That’s probably the better way. Though in either case, how do you know what the build configurations are? It’s a mistake to not check in the .project and other project meta data files. That’s like telling people not to check in .vcproj files. We need to understand why projects don’t want to do that and address their issues.

 

> want CMake to generate Makefiles and CDT calls make on those Makefiles to

> do the build. The only thing CDT cares about is what the compile commands

> are so we can use them to generate information so CDT can understand the

> code.

 

Ah, ok.

Currently the information in the compile_commands.json file is limited, it is really only one compile command for every source file.

 


That’s actually all we need for the CDT’s code parsers.

I guess you need to know which targets/executables are built in the project ?


We don’t really need that. The CDT searches all build output directories looking for binaries. We can do some fancier things if we do know the layout. I assume CMake always generates these things the same, no? In the end, we may have to parse the CMakeLists.txt files ourselves and get this information.

And which compiler is used, so the correct error parsing can be enabled ?


We can guess that based on the compile command. In the end, there really aren’t that many compilers out there.

Where do you want to get this from ?

 

Alex

 


Back to the top