Out of source build and KDevelop

Andy Cedilnik andy.cedilnik at kitware.com
Tue Oct 12 23:04:16 BST 2004


Hi All,

Alex Neundorf wrote a patch for CMake (www.cmake.org) that adds KDevelop
generator for CMake. What this means is that CMake can generate project
files for KDevelop.

That said, we ran into a bit of trouble. The problem is that so far we
could not figure out a way for sources to be in one directory and all
build files being in another. That includes all KDevelop files. 

Why is this good? Well, several reasons. First one, to remove all the
build files (generating tar, doing CVS etc, start all over), all you do
is to remove build tree. Also, sometimes sources are located in a
readonly partition (such as CD-ROM, /usr/share/doc/... etc). Another
problem is when you use the same source tree for different build trees.
In that case, the source has to provide all KDevelop files, which may
not be acceptable.

So, I played with the Alexes patch and managed to get it working by
doing the following:

1. Create two files: Project.kdevelop and Project.kdevelop.filelist
2. In Project.kdevelop put all necessary XML stuff including the
projectdirectory tag that points to the build tree
3. In the Project.kdevelop.filelist I had relative paths to actual
source files

So, it worked fine with couple of problems.

1. I can build fine
2. I can use File Groups to browse through the list of source files
3. CVS, Subversion etc do not work since they try to update build tree
4. File tree shows build tree and I cannot see the source files.

The possible solutions:

1. Write Project.kdevelop.filelist to source tree and point
projectdirectory to the source tree
+ simple to implement
+ everything works
- need writable source tree
- you cannot use same source tree for different builds except if exactly
the same files are used in all of them (no conditional compiling)

2. Add support for specifying directory for CVS, Subversion, and File
tree
+ More clean integration
+ No pollution of source tree
- Require individual settings for all possible modules (CVS,
Subversion...)
- Require modification of KDevelop

3. Have actual sourceDirectory and buildDirectory distinction.
+ The cleanest integration
+ No pollution of source tree
- Require modification of KDevelop

So, any comments?


-- 
				Andy Cedilnik
				Kitware Inc.


-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list