I couldn&#39;t find any way to search the CMake bug tracker, so it&#39;s entirely possible this is already filed. I didn&#39;t see any reference to it in my mailing list archives, however.<br><br>Policy CMP0009 is documented (when set to NEW) to make FILE(GLOB_RECURSE) only follow symlinks if the FOLLOW_SYMLINKS flag is set.<br>
<br>However, in practice, I find that when CMP0009 is set to NEW, symlinks are not followed *even if* FOLLOW_SYMLINKS is specified.<br><br><span style="font-family: courier new,monospace;">IF(COMMAND cmake_policy)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">  CMAKE_POLICY(SET CMP0009 NEW)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">ENDIF(COMMAND cmake_policy)</span><br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">FILE(GLOB_RECURSE TESTFILES RELATIVE &quot;${CMAKE_CURRENT_SOURCE_DIR}&quot; FOLLOW_SYMLINKS &quot;*.xq&quot;)</span><br style="font-family: courier new,monospace;">
<br>In this case, the current source directory contains a symlink to a subdirectory containing *.xq files, and TESTFILES willl not contain those paths.<br><br>If however I set the policy CMP0009 to OLD, I&#39;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&#39;t it?)<br>
<br>As mentioned in the subject, this is with CMake 2.6-patch 4. I&#39;m afraid I have not yet been able to test this out with CMake 2.8. I don&#39;t know if Kitware does maintenance releases for previous revisions.<br><br>
Ceej<br>aka Chris Hillery<br>