Did you try:
FILE (GLOB_RECURSE item "/path/to/some/area/*")

(Note the "/*" on the end of the globbing expression...)


On Wed, Feb 4, 2009 at 6:28 AM, Ashutosh Juneja
<[email protected]>wrote:

> Hi,
>
> 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:
> /path/to/some/area/ABC
> /path/to/some/area/DEF
> /path/to/some/area/XYZ
> /path/to/some/area/PQR.txt
>
> 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)
> ENDFOREACH(${item})
> =============================
>
> Can you provide any pointers to this?
> Is FILE(GLOB_RECURSE) the only method for globbing directory?
>
> Regards,
> Ashutosh
>
> _______________________________________________
> CMake mailing list
> [email protected]
> http://www.cmake.org/mailman/listinfo/cmake
>
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to