summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmGeneratorTarget.cxx6
-rw-r--r--Source/cmLocalGenerator.cxx3
-rw-r--r--Source/cmUseMangledMesaCommand.cxx3
3 files changed, 4 insertions, 8 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index b4706a3..f1c48cc 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3417,8 +3417,7 @@ std::string cmGeneratorTarget::GetPchHeader(const std::string& config,
file << pchEpilogue << "\n";
}
}
- cmSystemTools::CopyFileIfDifferent(filename_tmp, filename);
- cmSystemTools::RemoveFile(filename_tmp);
+ cmSystemTools::MoveFileIfDifferent(filename_tmp, filename);
}
return inserted.first->second;
}
@@ -3451,8 +3450,7 @@ std::string cmGeneratorTarget::GetPchSource(const std::string& config,
cmGeneratedFileStream file(filename_tmp);
file << "/* generated by CMake */\n";
}
- cmSystemTools::CopyFileIfDifferent(filename_tmp, filename);
- cmSystemTools::RemoveFile(filename_tmp);
+ cmSystemTools::MoveFileIfDifferent(filename_tmp, filename);
}
return inserted.first->second;
}
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 9152e94..3d8c3fb 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2275,8 +2275,7 @@ void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target,
}
}
}
- cmSystemTools::CopyFileIfDifferent(filename_tmp, filename);
- cmSystemTools::RemoveFile(filename_tmp);
+ cmSystemTools::MoveFileIfDifferent(filename_tmp, filename);
target->AddSource(filename, true);
diff --git a/Source/cmUseMangledMesaCommand.cxx b/Source/cmUseMangledMesaCommand.cxx
index cfc00e8..1fd386b 100644
--- a/Source/cmUseMangledMesaCommand.cxx
+++ b/Source/cmUseMangledMesaCommand.cxx
@@ -98,7 +98,6 @@ void CopyAndFullPathMesaHeader(const std::string& source,
// close the files before attempting to copy
fin.close();
fout.close();
- cmSystemTools::CopyFileIfDifferent(tempOutputFile, outFile);
- cmSystemTools::RemoveFile(tempOutputFile);
+ cmSystemTools::MoveFileIfDifferent(tempOutputFile, outFile);
}
}