[Cmake] FIND_FILE

Neil Killeen Neil . Killeen at atnf . csiro . au
Wed, 25 Jun 2003 21:54:54 +1000 (EST)


On 25 Jun 2003, Andy Cedilnik wrote:

> Hi Neil,
>
>
> On Wed, 2003-06-25 at 00:42, Neil Killeen wrote:
> > 1) Only those paths which are specified with an absolute path work.  This
> > is ok as I know where I am in the tree, but I dont see why relative paths
> > should not work.
>
> Relative paths from where? Source tree? Binary tree? Toplevel source
> tree? Starting source tree?
>

Well, from the current directory is what I expected (ha ha, hoped for)

> How about this:
>
> FIND_FILES(MYNAMES foo.latex ${CMAKE_CURRENT_SOURCE_DIR}/something)
>

I've been wanting this particular variable for a long time !
I don't suppose there is an uptodate list of CMake's predefined variables
squirreled away anywhere on the CMAKe site ?  I can't find it...


> > 2) Is it possible to wild card and find reecursively ?  I would really like to find
> > the names of ALL files underneath the working directory with the
> > given wildcarded name.  E.g.
> >
> > FIND_FILES (MYNAMES *.latex .)
> >
> > Even with an absolute path e.g.
> >
> > FIND_FILE (MYNAME3 *.latex /DATA/ELARA_3/mitk/Source/Code/Composite/Applications)
> >
> > (where there are many directories beneath Applications) would be ok.  I
> > have tried many syntaxes with no joy.
> >
> > What I am trying to do is automatically build an index of application
> > documentation.
>
> What you really want is something like
>
> GIVE_ME_LIST_OF_FILES(FILES expression [ expression ])
>
> I think this will be part of file command and is on the way to be in
> 1.8.
>
> 				Andy
>

ok - when do you anticipate that being ?

I am finishing my secondment in about 1 month and will hand over my CMake
work etc to someone else.  I'd like to have some kind of implementation
for this particualr need before then - is there a way
to simulate this behaviour in the mean time ?  Otherwise I will
just hand code and maintain  the index for now.

cheers
Neil