MCPcopy Create free account
hub / github.com/Kitware/CMake / CopyPackageFile

Method CopyPackageFile

Source/CPack/cmCPackGenerator.cxx:1027–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1025}
1026
1027bool 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
1050bool cmCPackGenerator::ReadListFile(char const* moduleName)
1051{

Callers 1

DoPackageMethod · 0.95

Calls 3

GetOptionMethod · 0.95
cmStrCatFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected