cmake single file build issues

Andreas Pakulat apaku at gmx.de
Mon Nov 24 17:09:28 UTC 2008


On 24.11.08 16:29:18, Manuel Breugelmans wrote:
> This is does not work as expected, see 
> https://bugs.kde.org/show_bug.cgi?id=175994
> 
> There's a couple more subtle issues with this code.
> 1/ Now you can do README -> compile and it will try to run `make README.o'
> 2/ The deletion code (m_deleteWhenDone cmakebuilder.cpp:91;111) is not safe. 
> It deletes a ProjectTargetItem in the event loop, the same item that is 
> exposed through the built(ProjectBaseItem*) signals. So anyone accessing this 
> is fooked.
> 
> I think all 3 problems could be fixed with a 'FileTarget' in the project model.

The problem is that we don't really want the target in the model, or do you
mean a mix of FileItem+TargetItem? I don't really see why that would be
needed. 

I mean why can't the Makebuilder do the dirty work here? It gets a project
item, so it can:

- fetch the builddir for that item (which probably needs some fixing in
  cmake manager)
- run make item.name().replace(".cpp",".o")

Where the replace would actually be configurable somehow (or use
information about the compiler, msvc/mingw create .obj usually).

Andreas

-- 
Change your thoughts and you change your world.




More information about the KDevelop-devel mailing list