diff options
author | Elijah Zarezky <elijah.zarezky@yandex.ru> | 2024-01-19 05:03:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-23 17:10:35 (GMT) |
commit | 453742ae883b43661cdf8cf94c27effd280d3758 (patch) | |
tree | 943b8179795fc9f1f2cd3dc54159cd244a875c5b /Modules/Internal | |
parent | 77dc558d1ed595887477410c5ac69b3e57cfbf0e (diff) | |
download | CMake-453742ae883b43661cdf8cf94c27effd280d3758.zip CMake-453742ae883b43661cdf8cf94c27effd280d3758.tar.gz CMake-453742ae883b43661cdf8cf94c27effd280d3758.tar.bz2 |
CPack/RPM: Enable rpm threads during package generation
Previously, `w7.xzdio` only used a single CPU core.
Honor `CPACK_THREADS`: `w7T${CPACK_THREADS}.xzdio` uses the specified
number of threads. `w7T.xzdio` uses all available CPU cores.
Fixes: #25615
Diffstat (limited to 'Modules/Internal')
-rw-r--r-- | Modules/Internal/CPack/CPackRPM.cmake | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Modules/Internal/CPack/CPackRPM.cmake b/Modules/Internal/CPack/CPackRPM.cmake index 85c0a93..5766045 100644 --- a/Modules/Internal/CPack/CPackRPM.cmake +++ b/Modules/Internal/CPack/CPackRPM.cmake @@ -1041,7 +1041,11 @@ function(cpack_rpm_generate_package) set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.lzdio") endif() if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "xz") - set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7.xzdio") + if(CPACK_THREADS GREATER "0") + set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7T${CPACK_THREADS}.xzdio") + else() + set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w7T.xzdio") + endif() endif() if(CPACK_RPM_COMPRESSION_TYPE STREQUAL "bzip2") set(CPACK_RPM_COMPRESSION_TYPE_TMP "%define _binary_payload w9.bzdio") |