diff options
author | KWSys Robot <kwrobot@kitware.com> | 2015-05-27 17:15:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-05-28 12:21:52 (GMT) |
commit | ee71b75133d3e515172b5fbe3dccf7d3906f5a19 (patch) | |
tree | 728faf237ba13c5a9764956be1c6c5133e007632 /testSystemTools.cxx | |
parent | 3b815ed283eb8d59c4e46dd89aa1e17c9f4deee6 (diff) | |
download | CMake-ee71b75133d3e515172b5fbe3dccf7d3906f5a19.zip CMake-ee71b75133d3e515172b5fbe3dccf7d3906f5a19.tar.gz CMake-ee71b75133d3e515172b5fbe3dccf7d3906f5a19.tar.bz2 |
KWSys 2015-05-27 (61e0419f)
Extract upstream KWSys using the following shell commands.
$ git archive --prefix=upstream-kwsys/ 61e0419f | tar x
$ git shortlog --no-merges --abbrev=8 --format='%h %s' b1d560a0..61e0419f
Brad King (1):
61e0419f SystemTools: Teach RemoveFile to tolerate missing file
Matt McCormick (1):
9a6b7c3f cmake: Set CMP0056 to NEW
Diffstat (limited to 'testSystemTools.cxx')
-rw-r--r-- | testSystemTools.cxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testSystemTools.cxx b/testSystemTools.cxx index 42b6249..15d8eab 100644 --- a/testSystemTools.cxx +++ b/testSystemTools.cxx @@ -156,6 +156,24 @@ static bool CheckFileOperations() res = false; } + kwsys_stl::string const testFileMissing(testNewDir + "/testMissingFile.txt"); + if (!kwsys::SystemTools::RemoveFile(testFileMissing)) + { + std::string const& msg = kwsys::SystemTools::GetLastSystemError(); + kwsys_ios::cerr << + "RemoveFile(\"" << testFileMissing << "\") failed: " << msg << "\n"; + res = false; + } + + kwsys_stl::string const testFileMissingDir(testNewDir + "/missing/file.txt"); + if (!kwsys::SystemTools::RemoveFile(testFileMissingDir)) + { + std::string const& msg = kwsys::SystemTools::GetLastSystemError(); + kwsys_ios::cerr << + "RemoveFile(\"" << testFileMissingDir << "\") failed: " << msg << "\n"; + res = false; + } + kwsys::SystemTools::Touch(testNewFile.c_str(), true); if (!kwsys::SystemTools::RemoveADirectory(testNewDir)) { |