From 60a921dce43d2cf2980faf0a5b16b011c0a52fdf Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Fri, 1 Aug 2025 16:45:15 +1000 Subject: [PATCH] Help: Note that some packaging preset keywords don't work as expected Due to how the default value of the CPACK_PACKAGE_FILE_NAME variable is implemented, the packageName and packageVersion fields of packaging presets don't affect the final package file name. They can still affect other aspects of the package produced, depending on the package generator used, leading to inconsistencies in the generated package. There is no warning or error about this when producing the packages, and fixing the implementation is non-trivial. Until such a fix can be made, add a note to the docs to make users aware of this unexpected behavior. Issue: #25248 --- Help/manual/cmake-presets.7.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index 9400a1bfc7..d354c25ee0 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -1083,9 +1083,25 @@ fields: ``packageName`` An optional string representing the package name. + .. note:: + + Due to problems with the implementation, this field does not affect the + name of the final package file produced. Other aspects of the package + may use the value though, leading to inconsistencies. + A future CMake release may address this problem, but until then, it is + recommended that this field not be used. + ``packageVersion`` An optional string representing the package version. + .. note:: + + Due to problems with the implementation, this field does not affect the + name of the final package file produced. Other aspects of the package + may use the value though, leading to inconsistencies. + A future CMake release may address this problem, but until then, it is + recommended that this field not be used. + ``packageDirectory`` An optional string representing the directory in which to place the package.