[Cmake] Collecting files from subdirs
Nils H. Busch
nilsb at cns . mpg . de
Mon, 31 Mar 2003 18:39:50 +0100
--------------3F34F328C00FF540788870D4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
"William A. Hoffman" wrote:
> Each subdir is treated as its own makefile and scope. Only
> cached variables are passed from one sub dir to another.
> You have some choices:
>
> 1. use the INCLUDE command instead of the SUBDIRS command to include
> the lists file in the subdir.
> 2. List out the sources in the parent directory explicitly
> SET(SRCS subdir/file1.cxx subdir/file2.cxx ....)
> 3. Use AUX_SOURCE_DIRECTORY, but that is really just a variation on 2, its main
> use is really having cmake collect all the source names instead of listing
> them one
> by one.
>
> -Bill
>
Declaring them as cached vars did not seem to work for me, but approach 1 does.
There is just this minor glib that somehow under my current dir a whole new subdir
tree consisting of the complete current path is created recursively ;-)
I thought an INSTALL_FILES is the culprit, but despite commenting it out, there it
is again.
Well, I'll do some debugging...
Thanks a lot so far.
--
Nils H. Busch
Max-Planck-Institute of Cognitive Neuroscience
phone: ++49 (341) 9940-035 fax: ++49 (341) 9940-204
e-mail: nilsb at cns . mpg . de
--------------3F34F328C00FF540788870D4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
"William A. Hoffman" wrote:
<blockquote TYPE=CITE>Each subdir is treated as its own makefile and scope.
Only
<br>cached variables are passed from one sub dir to another.
<br>You have some choices:
<p>1. use the INCLUDE command instead of the SUBDIRS command to include
<br>the lists file in the subdir.
<br>2. List out the sources in the parent directory explicitly
<br>SET(SRCS subdir/file1.cxx subdir/file2.cxx ....)
<br>3. Use AUX_SOURCE_DIRECTORY, but that is really just a variation on
2, its main
<br>use is really having cmake collect all the source names instead of
listing
<br>them one
<br>by one.
<p>-Bill
<br><a href="http://public . kitware . com/mailman/listinfo/cmake"></a> </blockquote>
Declaring them as cached vars did not seem to work for me, but approach
1 does.
<br>There is just this minor glib that somehow under my current dir a whole
new subdir tree consisting of the complete current path is created recursively
;-)
<br>I thought an INSTALL_FILES is the culprit, but despite commenting it
out, there it is again.
<br>Well, I'll do some debugging...
<p>Thanks a lot so far.
<pre>--
Nils H. Busch
Max-Planck-Institute of Cognitive Neuroscience
phone: ++49 (341) 9940-035 fax: ++49 (341) 9940-204
e-mail: nilsb at cns . mpg . de</pre>
</html>
--------------3F34F328C00FF540788870D4--