summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2014-11-25 22:49:25 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-03 14:47:44 (GMT)
commite6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7 (patch)
treef5e6a3dce7b89725f9fa4e5fcafd040114a85466 /Source/cmGlobalGenerator.h
parent05d6531c7a8ecfad513a0e76b44b273b70fa919b (diff)
downloadCMake-e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7.zip
CMake-e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7.tar.gz
CMake-e6db4c5a4ede8039ed525e3facebd7e0eb7ec1b7.tar.bz2
file: Add LOCK subcommand to do file and directory locking
Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases.
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 926efe7..6b75298 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -23,6 +23,7 @@
#include "cmGeneratorExpression.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
+# include "cmFileLockPool.h"
# include <cmsys/hash_map.hxx>
#endif
@@ -348,6 +349,10 @@ public:
std::set<cmTarget const*> const&
GetFilenameTargetDepends(cmSourceFile* sf) const;
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ cmFileLockPool& GetFileLockPool() { return FileLockPool; }
+#endif
+
protected:
virtual void Generate();
@@ -499,6 +504,11 @@ private:
mutable std::map<cmSourceFile*, std::set<cmTarget const*> >
FilenameTargetDepends;
+
+#if defined(CMAKE_BUILD_WITH_CMAKE)
+ // Pool of file locks
+ cmFileLockPool FileLockPool;
+#endif
};
#endif