mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-02 04:02:23 +03:00
CPackRPM: Do not run file(GLOB_RECURSE) without CMP0009 set to NEW
The file(GLOB_RECURSE) call added by commit 3ec02547 (CPackRPM: Allow
multiple path relocation prefixes for one package, 2015-01-21) should
not follow directory symlinks, so make sure CMP0009 is set to NEW.
This commit is contained in:
1 parent
3d99355b11
commit
be36bfd65d
1 file changed
+6
-1
@@ -455,7 +455,12 @@ function(cpack_rpm_prepare_relocation_paths)
|
||||
endforeach()
|
||||
|
||||
# warn about all the paths that are not relocatable
|
||||
file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*")
|
||||
cmake_policy(PUSH)
|
||||
# Tell file(GLOB_RECURSE) not to follow directory symlinks
|
||||
# even if the project does not set this policy to NEW.
|
||||
cmake_policy(SET CMP0009 NEW)
|
||||
file(GLOB_RECURSE FILE_PATHS_ "${WDIR}/*")
|
||||
cmake_policy(POP)
|
||||
foreach(TMP_PATH ${FILE_PATHS_})
|
||||
string(LENGTH "${WDIR}" WDIR_LEN)
|
||||
string(SUBSTRING "${TMP_PATH}" ${WDIR_LEN} -1 TMP_PATH)
|
||||
|
||||
Reference in new issue
Block a user