summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-02-12 14:45:56 (GMT)
committerBrad King <brad.king@kitware.com>2014-02-12 14:55:41 (GMT)
commit7b1f966a6c456270004a2aec2c53057ca8efbac9 (patch)
tree9ac334c91b0a8a501ef34350bf8675cd5ce6f719 /Source/cmSystemTools.h
parent5104f55d3f9cf2f9b2537364d1b9a5c86d2f790b (diff)
downloadCMake-7b1f966a6c456270004a2aec2c53057ca8efbac9.zip
CMake-7b1f966a6c456270004a2aec2c53057ca8efbac9.tar.gz
CMake-7b1f966a6c456270004a2aec2c53057ca8efbac9.tar.bz2
Windows: Make file delete/rename retry configurable
Several CMake operations need to replace files in rapid succession. This commonly fails on Windows due to filesystem lock behavior so we have retry loops. No matter how many times we retry or how long we delay there will inevitably be someone with an environment that needs more. Make the retry count and delay configurable in the Windows Registry keys: {HKCU,HKLM}/Software/Kitware/CMake/Config in DWORD values FilesystemRetryCount = Number of tries FilesystemRetryDelay = Delay in milliseconds between tries Leave the feature undocumented for now to see how it goes.
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r--Source/cmSystemTools.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h
index 4e854c8..4a5d298 100644
--- a/Source/cmSystemTools.h
+++ b/Source/cmSystemTools.h
@@ -460,6 +460,15 @@ public:
/** Tokenize a string */
static std::vector<std::string> tokenize(const std::string& str,
const std::string& sep);
+
+#ifdef _WIN32
+ struct WindowsFileRetry
+ {
+ unsigned int Count;
+ unsigned int Delay;
+ };
+ static WindowsFileRetry GetWindowsFileRetry();
+#endif
private:
static bool s_ForceUnixPaths;
static bool s_RunCommandHideConsole;