|
|
@@ -749,9 +749,11 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
|
|
|
// If error occurs we want to continue copying next files.
|
|
|
bool return_value = false;
|
|
|
for (auto const& file : files) {
|
|
|
- if (!cmsys::SystemTools::CopyFileAlways(file, *targetArg)) {
|
|
|
+ cmsys::SystemTools::CopyStatus const status =
|
|
|
+ cmSystemTools::CopyFileAlways(file, *targetArg);
|
|
|
+ if (!status) {
|
|
|
std::cerr << "Error copying file \"" << file << "\" to \""
|
|
|
- << *targetArg << "\".\n";
|
|
|
+ << *targetArg << "\": " << status.GetString() << '\n';
|
|
|
return_value = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -771,9 +773,12 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
|
|
|
// If error occurs we want to continue copying next files.
|
|
|
bool return_value = false;
|
|
|
for (auto const& arg : cmMakeRange(args).advance(2).retreat(1)) {
|
|
|
- if (!cmSystemTools::CopyFileIfDifferent(arg, args.back())) {
|
|
|
+ cmsys::SystemTools::CopyStatus const status =
|
|
|
+ cmSystemTools::CopyFileIfDifferent(arg, args.back());
|
|
|
+ if (!status) {
|
|
|
std::cerr << "Error copying file (if different) from \"" << arg
|
|
|
- << "\" to \"" << args.back() << "\".\n";
|
|
|
+ << "\" to \"" << args.back()
|
|
|
+ << "\": " << status.GetString() << '\n';
|
|
|
return_value = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -793,9 +798,12 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
|
|
|
// If error occurs we want to continue copying next files.
|
|
|
bool return_value = false;
|
|
|
for (auto const& arg : cmMakeRange(args).advance(2).retreat(1)) {
|
|
|
- if (!cmSystemTools::CopyFileIfNewer(arg, args.back())) {
|
|
|
+ cmsys::SystemTools::CopyStatus const status =
|
|
|
+ cmSystemTools::CopyFileIfNewer(arg, args.back());
|
|
|
+ if (!status) {
|
|
|
std::cerr << "Error copying file (if newer) from \"" << arg
|
|
|
- << "\" to \"" << args.back() << "\".\n";
|
|
|
+ << "\" to \"" << args.back()
|
|
|
+ << "\": " << status.GetString() << '\n';
|
|
|
return_value = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -818,9 +826,11 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
|
|
|
}
|
|
|
|
|
|
for (auto const& arg : cmMakeRange(args).advance(2).retreat(1)) {
|
|
|
- if (!cmSystemTools::CopyADirectory(arg, args.back(), when)) {
|
|
|
+ cmsys::Status const status =
|
|
|
+ cmSystemTools::CopyADirectory(arg, args.back(), when);
|
|
|
+ if (!status) {
|
|
|
std::cerr << "Error copying directory from \"" << arg << "\" to \""
|
|
|
- << args.back() << "\".\n";
|
|
|
+ << args.back() << "\": " << status.GetString() << '\n';
|
|
|
return_value = true;
|
|
|
}
|
|
|
}
|
|
|
@@ -1023,8 +1033,10 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
|
|
|
// If an error occurs, we want to continue making directories.
|
|
|
bool return_value = false;
|
|
|
for (auto const& arg : cmMakeRange(args).advance(2)) {
|
|
|
- if (!cmSystemTools::MakeDirectory(arg)) {
|
|
|
- std::cerr << "Error creating directory \"" << arg << "\".\n";
|
|
|
+ cmsys::Status const status = cmSystemTools::MakeDirectory(arg);
|
|
|
+ if (!status) {
|
|
|
+ std::cerr << "Error creating directory \"" << arg
|
|
|
+ << "\": " << status.GetString() << '\n';
|
|
|
return_value = true;
|
|
|
}
|
|
|
}
|