CPack + NSIS + Components with '-' in the name
cmake --version cmake version 3.15.0
cpack --version cpack version 3.15.0
This can easily be reproduced with the LLVM build system making it hard to package specific binaries for distribution.
cd CMakeTest
mkdir build
cd build
cmake -GNinja -DCPACK_COMPONENTS_ALL=make-1;make-2 ..\
ninja package
CPack: Create package using NSIS
CPack: Install projects
CPack: - Install project: myproject
CPack: - Install component: make-1
CPack: - Install component: make-2
CPack: Create package
CPack Error: Problem running NSIS command: ".../makensis.exe" ".../CMakeTest/build/_CPack_Packages/win64/NSIS/project.nsi"
Please check .../CMakeTest/build/_CPack_Packages/win64/NSIS/NSISOutput.log for errors
CPack Error: Problem compressing the directory
CPack Error: Error when generating package:
FAILED: CMakeFiles/package.util
cmd.exe /C "cd /D "...\CMakeTest\build" && "...\CMake\bin\cpack.exe" --config ./CPackConfig.cmake"
ninja: build stopped: subcommand failed.
cat ".../CMakeTest/build/_CPack_Packages/win64/NSIS/NSISOutput.log"
# Run command: ".../NSIS/makensis.exe" ".../CMakeTest/build/_CPack_Packages/win64/NSIS/project.nsi"
# Output:
Processing config: C:\Program Files (x86)\NSIS\nsisconf.nsh
Processing script file: ".../CMakeTest/build/_CPack_Packages/win64/NSIS/project.nsi" (ACP)
Error: invalid characters in variable name "make-1_selected", use only characters [a-z][A-Z][0-9] and '_'
Error in script ".../CMakeTest/build/_CPack_Packages/win64/NSIS/project.nsi" on line 54 -- aborting creation process