[CMake] Re: Out of source build and KDevelop

Bill Hoffman bill.hoffman at kitware.com
Wed Oct 20 08:05:46 EDT 2004


GetHomeDirectory will return the very top level directory.
However, you should not need it for each project.  The
map < name, vector<local gen> > will have the name
of each project and a vector of local generators.  The first
local gen in each vector will be the one for the cmakelist
file that contained the PROJECT(name) command that matches the
name in the map.   So, to get the toplevel source directory for
a project, you can get the binary and source dir from the cmMakefile
of the local generator.   I am assuming that each sub project does
not need to know the top of the entire project, just the top for
itself.

-Bill


At 02:05 AM 10/20/2004, Alexander Neundorf wrote:
>... 
>> So, it would not work exactly like it does now.  It would require the 
>> PROJECT() 
>> in each subdir to generate a sub-project.    
> 
>I.e. adding PROJECT() in some directories, that's no problem for me. 
>Still in cmLocalKDevelopGenerator in one place
>GetProperty("PROJECT_SOURCE_DIR") is 
>used to get the toplevel source directory. This needs to stay the top source
>
>directory. I guess if I insert multiple PROJECT() calls in my CMakeLists.txt
>this 
>will not always return this directory. 
>Does GetHomeDirectory() (or how it's called) return this directory, i.e. the
>one 
>from which cmake was called initially ? 
> 
>Bye 
>Alex 
> 
>
>-- 
>GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
>+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++




More information about the CMake mailing list