[CMake] Eclipse CDT4 CMake Generator - Pre-Alpha version

Mike Jackson imikejackson at gmail.com
Tue Jul 31 16:24:05 EDT 2007


You dont. That is what I tried to explain in one of my other posts.  
Eclipse has the notion of One project PER top level directory. If you  
had a project setup like the above then you would have to actually  
take the folder sub1 and place it at the same level as foo.

    Let's get straight what _Should_ be going on. The eclipse  
generator is basically going to generate a single eclipse project  
file that has the following properties:
    Project Type: Makefile
    Build Command: /usr/bin/make -C ${project_loc}/[path to build dir]
    Include Dirs: Loop through them and add them all, regardless of  
where they are defined. Eclipse needs them all to index you project  
correctly.
    Source Dirs: Don't need these
    Unless all your sources are loose in the top level you need to  
add each source directory to the "Include" paths

What is happening is that Eclipse is going to use the generated  
Makefile as its build system. The project files that are created are  
actually pretty small because most everything is going to be defined  
in the makefile and eclipse is going to run "/usr/bin/make ....." and  
then parse the output for warnings and errors.

Does this help explain things better?
-- 
Mike Jackson   Senior Research Engineer
Innovative Management & Technology Services


On Jul 31, 2007, at 3:59 PM, Alexander Neundorf wrote:

> What do you do for
> PROJECT(foo)
> sub1/PROJECT(P1)
> sub2/PROJECT(P2)
>
> I think each PROJECT() command should be treated as if it would be a
> completely independent project, so that you can load any of the  
> project files
> and have it fully working. One project shouldn't care about the other
> projects I think.
> (In the CodeBlocks generator this is currently done differently,  
> but I'll
> change this, so that for every PROJECT() a project group is created).



More information about the CMake mailing list