CPack/NSIS Generator Issues

Problem 1:

I think there might be an issue with CPack’s NSIS generator where if the components (specified through CPACK_COMPONENTS_ALL contains a-` (eg. llvm-nm, llvm-libtool) then the generator creates variables with the ‘-’ character and later cannot work with them.

Problem 2:

CPack seems to either build the install or all target instead of using the components-list specified in CPACK_COMPONENTS_ALL. At best this causes a longer build and at worst it fails because the build tries to build components that fail to build but are not part of the distribution.

Can someone please let me know if these are known problems and how to either fix or workaround them?

Thanks in advance!

For problem 1, if you can reproduce it in a small test case please open an issue in the CMake Issue Tracker.

For problem 2, CPack components work only with installation components for which there is no mapping to specific build targets. It has to build all in order to ensure all needed content is available for installation. One approach to addressing this in your project is to have suitable configuration options to not build things you’re not going to package.

I see CMake Issue 19982 for problem 1, thanks!