diff options
author | Gauthier Lamaison <gauthier.lamaison@gmail.com> | 2014-11-17 19:29:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-11-18 14:25:10 (GMT) |
commit | 51a60973eb67b33e857473f2fe98ae25943f7648 (patch) | |
tree | a53add584fe34761123f755cff79e4a6a99b4082 /Modules/CPackRPM.cmake | |
parent | 3609fceee75b4f3751a702ac0a7f21e5cbd67a0a (diff) | |
download | CMake-51a60973eb67b33e857473f2fe98ae25943f7648.zip CMake-51a60973eb67b33e857473f2fe98ae25943f7648.tar.gz CMake-51a60973eb67b33e857473f2fe98ae25943f7648.tar.bz2 |
CPackRPM: Unset temporary component variables before re-use
Improve the fix from commit v2.8.9~136^2 (CPackRPM: avoid leakage of RPM
directive from one component to another, 2012-06-05) to clean up more
temporary variables.
Reviewed-by: Domen Vrankar <domen.vrankar@gmail.com>
Diffstat (limited to 'Modules/CPackRPM.cmake')
-rw-r--r-- | Modules/CPackRPM.cmake | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake index 66717ef..d2cb2ee 100644 --- a/Modules/CPackRPM.cmake +++ b/Modules/CPackRPM.cmake @@ -678,6 +678,8 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC endif() endif() + # Do not forget to unset previously set header (from previous component) + unset(TMP_RPM_${_RPM_SPEC_HEADER}) # Treat the RPM Spec keyword iff it has been properly defined if(DEFINED CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) # Transform NAME --> Name e.g. PROVIDES --> Provides @@ -698,9 +700,7 @@ foreach(_RPM_SPEC_HEADER URL REQUIRES SUGGESTS PROVIDES OBSOLETES PREFIX CONFLIC message("CPackRPM:Debug: User defined ${_PACKAGE_HEADER_NAME}:\n ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") endif() set(TMP_RPM_${_RPM_SPEC_HEADER} "${_PACKAGE_HEADER_NAME}: ${CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP}") - else() - # Do not forget to unset previously set header (from previous component) - unset(TMP_RPM_${_RPM_SPEC_HEADER}) + unset(CPACK_RPM_PACKAGE_${_RPM_SPEC_HEADER}_TMP) endif() endforeach() |