Commit Graph

4 Commits

Author SHA1 Message Date
Stephen Kelly ac26d4b343 Split cmAlgorithms into a separate header file. 2015-02-10 22:14:18 +01:00
Stephen Kelly 4a6e795b0c Use the cmDeleteAll algorithm instead of trivial raw loops. 2015-01-13 23:00:17 +01:00
Ruslan Baratov 97841dad2b file: Use 'long' to represent the parsed LOCK TIMEOUT value
Convert the StringToInt helper into a StringToLong helper with a 'long'
result type.  This will make the helper more useful to other callers
that want to use strtol.

While at it, also check errno after calling strtol in case the
conversion fails with a range error.
2014-12-05 12:59:37 -05:00
Ruslan Baratov e6db4c5a4e 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.
2014-12-03 09:47:44 -05:00