diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-22 08:14:46 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-22 08:57:10 (GMT) |
commit | 9c576a88d95b302882bcb0a021dcf03982a40902 (patch) | |
tree | 37f7179633b02af9328e5d22574ee8effdf31459 /Source/cmFileCommand.cxx | |
parent | 4b45a5d5c7f9266e5ca08f6d5676759b9aac4235 (diff) | |
download | CMake-9c576a88d95b302882bcb0a021dcf03982a40902.zip CMake-9c576a88d95b302882bcb0a021dcf03982a40902.tar.gz CMake-9c576a88d95b302882bcb0a021dcf03982a40902.tar.bz2 |
Use cmFileTimes instead of cmSystemToolsFileTime interface
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r-- | Source/cmFileCommand.cxx | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index aa8a919..f522d36 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -25,6 +25,7 @@ #include "cmFileCopier.h" #include "cmFileInstaller.h" #include "cmFileLockPool.h" +#include "cmFileTimes.h" #include "cmGeneratorExpression.h" #include "cmGlobalGenerator.h" #include "cmHexFileConverter.h" @@ -52,8 +53,6 @@ # include <windows.h> #endif -class cmSystemToolsFileTime; - #if defined(_WIN32) // libcurl doesn't support file:// urls for unicode filenames on Windows. // Convert string from UTF-8 to ACP if this is a file:// URL. @@ -1114,8 +1113,7 @@ bool cmFileCommand::HandleRPathChangeCommand( return false; } bool success = true; - cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew(); - bool have_ft = cmSystemTools::FileTimeGet(file, ft); + cmFileTimes const ft(file); std::string emsg; bool changed; if (!cmSystemTools::ChangeRPath(file, oldRPath, newRPath, &emsg, &changed)) { @@ -1139,11 +1137,8 @@ bool cmFileCommand::HandleRPathChangeCommand( message += "\""; this->Makefile->DisplayStatus(message, -1); } - if (have_ft) { - cmSystemTools::FileTimeSet(file, ft); - } + ft.Store(file); } - cmSystemTools::FileTimeDelete(ft); return success; } @@ -1182,8 +1177,7 @@ bool cmFileCommand::HandleRPathRemoveCommand( return false; } bool success = true; - cmSystemToolsFileTime* ft = cmSystemTools::FileTimeNew(); - bool have_ft = cmSystemTools::FileTimeGet(file, ft); + cmFileTimes const ft(file); std::string emsg; bool removed; if (!cmSystemTools::RemoveRPath(file, &emsg, &removed)) { @@ -1203,11 +1197,8 @@ bool cmFileCommand::HandleRPathRemoveCommand( message += "\""; this->Makefile->DisplayStatus(message, -1); } - if (have_ft) { - cmSystemTools::FileTimeSet(file, ft); - } + ft.Store(file); } - cmSystemTools::FileTimeDelete(ft); return success; } |