| 1025 | } |
| 1026 | |
| 1027 | bool cmCPackGenerator::CopyPackageFile(std::string const& srcFilePath, |
| 1028 | cm::string_view filename) const |
| 1029 | { |
| 1030 | std::string destFilePath = |
| 1031 | cmStrCat(this->GetOption("CPACK_OUTPUT_FILE_PREFIX"), '/', filename); |
| 1032 | cmCPackLogger(cmCPackLog::LOG_DEBUG, |
| 1033 | "Copy final package(s): " |
| 1034 | << (!srcFilePath.empty() ? srcFilePath : "(NULL)") << " to " |
| 1035 | << (!destFilePath.empty() ? destFilePath : "(NULL)") |
| 1036 | << std::endl); |
| 1037 | if (!cmSystemTools::CopyFileIfDifferent(srcFilePath, destFilePath)) { |
| 1038 | cmCPackLogger( |
| 1039 | cmCPackLog::LOG_ERROR, |
| 1040 | "Problem copying the package: " |
| 1041 | << (!srcFilePath.empty() ? srcFilePath : "(NULL)") << " to " |
| 1042 | << (!destFilePath.empty() ? destFilePath : "(NULL)") << std::endl); |
| 1043 | return false; |
| 1044 | } |
| 1045 | cmCPackLogger(cmCPackLog::LOG_OUTPUT, |
| 1046 | "- package: " << destFilePath << " generated." << std::endl); |
| 1047 | return true; |
| 1048 | } |
| 1049 | |
| 1050 | bool cmCPackGenerator::ReadListFile(char const* moduleName) |
| 1051 | { |