[CMake] Policy CMP0009 doesn't work (2.6.4)
Chris Hillery
chillery-cmake at lambda.nu
Wed Mar 17 21:17:52 EDT 2010
I couldn't find any way to search the CMake bug tracker, so it's entirely
possible this is already filed. I didn't see any reference to it in my
mailing list archives, however.
Policy CMP0009 is documented (when set to NEW) to make FILE(GLOB_RECURSE)
only follow symlinks if the FOLLOW_SYMLINKS flag is set.
However, in practice, I find that when CMP0009 is set to NEW, symlinks are
not followed *even if* FOLLOW_SYMLINKS is specified.
IF(COMMAND cmake_policy)
CMAKE_POLICY(SET CMP0009 NEW)
ENDIF(COMMAND cmake_policy)
FILE(GLOB_RECURSE TESTFILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
FOLLOW_SYMLINKS "*.xq")
In this case, the current source directory contains a symlink to a
subdirectory containing *.xq files, and TESTFILES willl not contain those
paths.
If however I set the policy CMP0009 to OLD, I'll get all those files, the
same as if I do not set the policy to anything, *In either case*, I get a
warning message about setting it, but the symlinks will be followed. (This
is another bug - explicitly setting the policy to OLD should disable the
warning, shouldn't it?)
As mentioned in the subject, this is with CMake 2.6-patch 4. I'm afraid I
have not yet been able to test this out with CMake 2.8. I don't know if
Kitware does maintenance releases for previous revisions.
Ceej
aka Chris Hillery
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100317/ede89aa6/attachment.htm>
More information about the CMake
mailing list