CPack does not give an error when CPACK_DEBIAN_*_PACKAGE_CONTROL_EXTRA points to a missing file
I had a typo in the path used with the CPACK_DEBIAN_SERVICE_PACKAGE_CONTROL_EXTRA directive (one level of directory was missing). Building the package succeeded and the file was simply missing in the resulting directory. No warnings or errors whatsoever. A missing file should trigger an error message and cause the build to fail.
Caused by the following code in Source/CPack/cmCPackDebGenerator.cxx:
// if we can copy the file, it means it does exist, let's add it:
if (cmsys::SystemTools::CopyFileIfDifferent(i, localcopy)) {
control_tar.Add(localcopy, strGenWDIR.length(), ".");
}
Nothing happens if the source file does not exist (no else
branch).