[CMake] Problems globbing directory by FILE(GLOB_RECURSE)

Ashutosh Juneja ashutosh.juneja at gmail.com
Wed Feb 4 06:28:54 EST 2009


I want to glob directories from a specified location, but unable to do so.
My purpose is to run cmake and generate CTestTestfile.cmake in binary tree
having multiple ADD_TEST commands.

i.e. I want to extract directories ABC and DEF from an area listed below:

I am using following code:
====Source tree: CMakelists.txt ====
FILE (GLOB_RECURSE item "/path/to/some/area")

FOREACH(suite ${item})
     MESSAGE ("Now Globbing..... ${item}")
     ADD_TEST(${suite} EXEC /path/to/wrapper/script)

Can you provide any pointers to this?
Is FILE(GLOB_RECURSE) the only method for globbing directory?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090204/7aa29840/attachment.htm>

More information about the CMake mailing list