mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
CPack: use a distinct checksum file for each generator
Different CPack generators could produce checksum files with the same name which were overwritten by each other since only package name without extensions was used for checksum file name generation. This patch adds package extension to checksum files to prevent collisions. Fixes: #16840
This commit is contained in:
@@ -999,8 +999,7 @@ int cmCPackGenerator::DoPackage()
|
||||
/* Generate checksum file */
|
||||
if (crypto.get() != nullptr) {
|
||||
std::string hashFile(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"));
|
||||
hashFile +=
|
||||
"/" + filename.substr(0, filename.rfind(this->GetOutputExtension()));
|
||||
hashFile += "/" + filename;
|
||||
hashFile += "." + cmSystemTools::LowerCase(algo);
|
||||
cmsys::ofstream outF(hashFile.c_str());
|
||||
if (!outF) {
|
||||
|
||||
Reference in New Issue
Block a user