[CMake] Bug? Broken header files in Visual C++ 2008 project

Andreas Pakulat apaku at gmx.de
Thu Sep 4 03:30:31 EDT 2008


On 03.09.08 23:45:56, Alexander Neundorf wrote:
> On Wednesday 03 September 2008, Andreas Pakulat wrote:
> > On 03.09.08 17:52:02, Alexander Neundorf wrote:
> > > On Thursday 28 August 2008, Andreas Pakulat wrote:
> > > > On 28.08.08 10:16:48, BRM wrote:
> > >
> > > ...
> > >
> > > > IMHO the approach to regenerate project description files for an IDE
> > > > from a buildsystem tool is simply broken.
> > >
> > > Well, it has to. Otherwise the project file become wrong. That's not a
> > > big problem for the makefile-based project generators (KDevelop, Eclipse,
> > > CodeBlocks), but a real one for XCode and MSVC.
> >
> > Yeah, I guess I'm really just too used to proper IDE's that don't
> > re-invent the wheel and separate buildsystem from project config
> > properly.
> 
> Uh-oh, "proper".
> I guess basically each developer of an IDE is convinced that "his" IDE does it 
> the "proper" way ;-)

Of course, what did you expect.

> (you know there is also one thing in kdev4 which I wouldn't call "proper")

Then you're really lucky. I've got a complete list of things that are
not "proper" in kdev4. But enough OT here :)

> > > > KDevelop3 doesn't need that information at all, or rather it completely
> > > > ignores the CMake files anyway.
> > >
> > > Which files do you mean with "the CMake files" ?
> >
> > Everything related to CMake, i.e. CMakeLists.txt, the stuff in the
> > builddir and so on.
> 
> Ah, yes.
> What would be cool would be if I could force kdevelop to reread its project 
> files (... after they have been regenerated by cmake).
> Is this possible maybe via DCOP ?

Let me check... The openProject() call is in fact available via dcop. Of
course this is not a "silent" operation, i.e. the user will get asked if
he wants to re-open the current project.

I could add the needed functionality, but this won't show up in a stable
release for quite some time.

> > > > The generator for KDevelop3 projects in CMake is ok if you want to get
> > > > an initial project status, but after that you shouldn't use it anymore.
> > >
> > > Why ?
> >
> > Because it overwrites project settings that you have in the .kdevelop
> > file. 
> 
> Hmm, I didn't change a lot in it since a long time, but it should (since more 
> or less the beginning) not overwrite settings, which means, it should only 
> overwrite the following tags:

Hmm, then I must be remembering wrongly. I thought it completely
overwrites the .kdevelop file. Just tested it and indeed .kdevelop isn't
change. Unfortunately this doesn't mean all is well :(

> <projectdirectory>
> <projectmanagement>
> <absoluteprojectpath>
> <filelistdirectory>
> <buildtool>
> <builddir>

I changed the builddir, by renaming it. Then re-run cmake -GKDevelop3
and it didn't update the builddir entry in the .kdevelop file. After
removing the CMake-related files, but leaving the kdevelop files the
builddir is updated properly.

BTW: This just told me why it is so bad that the cmake generator puts
the kdevelop-files into the builddir. The builddir is often enough
simply wiped out completely when you want to move it elsewhere or start
from scratch - which means losing the project configuration. So at least
the .kdevelop file should IMHO be generated in the sourcedir.

Andreas

-- 
Be free and open and breezy!  Enjoy!  Things won't get any better so
get used to it.


More information about the CMake mailing list