CPack follows directory symlinks when creating source package
Using CPACK_SOURCE_GENERATOR TGZ
, the package_source
target seems to follow directories that are symlinks and thus extra files are added to the generated tarball. The files that are symlinks are handled as expected:
../../Source/CPack/cmCPackGenerator.cxx:439 Will create a symlink: ....
From my understanding, in the above case CPack uses glob.GetFiles()
with RecurseThroughSymlinks
set to True (default). Still, I see that in other cases this is set explicitly to False (see https://gitlab.kitware.com/cmake/cmake/blob/master/Source/CPack/cmCPackGenerator.cxx#L865).
Shouldn't CPack preserve the directory symlinks in source packages as well?