For custom-built toolchains, it's extremely useful to be able to override the CPack packaging instructions, especially on Windows.
Elsewhere in the build it's already possible to override the Vendor that appears in the binary. It would be nice to be able to carry this through to installers.
This patch does introduce a CMake warning about the CPACK_NSIS_COMPRESSOR variable having a newline character. Note that no changes have been made to the variable values themselves here, just the caching.
There is also the "sticky cache" issue here. If I configure by build tree first with 13.0.0, this gets set to 13. If I then continue to use this build tree through to 14.0.0…it is still 13. I suggest, instead doing something like this:
set(CPACK_PACKAGE_VERSION_MAJOR "<DEFAULT>" CACHE STRING "") if (CPACK_PACKAGE_VERSION_MAJOR STREQUAL "<DEFAULT>") set(CPACK_PACKAGE_VERSION_MAJOR "${LLVM_VERSION_MAJOR}") elseif (NOT CPACK_PACKAGE_VERSION_MAJOR STREQUAL LLVM_VERSION_MAJOR) # This condition is optional, but can help when manual settings are stale. message(AUTHOR_WARNING "Manually set `CPACK_PACKAGE_VERSION_MAJOR` does not match the " "detected major version of `${LLVM_VERSION_MAJOR}`; your cache may " "be out-of-date." endif ()so that it actually acts like a default rather than an initial value that "sticks around" in cases where "no one" would want it to.