diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-02-10 22:03:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-11 14:56:27 (GMT) |
commit | be36bfd65d53962c7ba975382bd911e0857f6a33 (patch) | |
tree | 5d2a100afb59623d3c205d797d09210b4589b7f3 /Modules/CPackRPM.cmake | |
parent | 3d99355b11b2509f4e16ddfd71373538410364e7 (diff) | |
download | CMake-be36bfd65d53962c7ba975382bd911e0857f6a33.zip CMake-be36bfd65d53962c7ba975382bd911e0857f6a33.tar.gz CMake-be36bfd65d53962c7ba975382bd911e0857f6a33.tar.bz2 |
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.
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 214d655..7516393 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -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) |