[CMake] file(GLOB oddities

Kevin Fitch kfitch42 at gmail.com
Fri Aug 27 10:17:09 EDT 2010


I am running into an issue that causing me a bit of trouble:
file(GLOB globOutput test)
returns the absolute path to test (assuming there is a test directory under
my current dir). Whereas
file(GLOB globOutput .)
returns an empty string. This is particularly annoying because
file(GLOB globOutput non-existant-dir)
also returns an empty string.

And the follow on to this is that the documentation for IS_DIRECTORY,
EXISTS, ... says:
 Behavior is well-defined only for full paths.
What exactly does that mean? Just to clarify, is a "full path" an absolute
path (e.g. as determined by IS_ABSOLUTE)? The only way I have found to get
an absolute path is to use file(GLOB which works for anything other than .

Kevin Fitch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100827/edadd244/attachment.htm>


More information about the CMake mailing list