FILE(LOCK ... GUARD FILE) fails with cmake -P
Original discussion: https://www.mail-archive.com/cmake@cmake.org/msg56960.html
$ cat x.cmake
FILE(LOCK . DIRECTORY GUARD FILE)
$ cat y.cmake
INCLUDE(x.cmake)
$ cmake -P x.cmake
Assertion failed: (!this->FileScopes.empty()), function LockFileScope,
file /wrkdirs/usr/ports/devel/cmake/work/cmake-3.5.0/Source/cmFileLockPool.cxx,
line 76.
Abort trap (core dumped)
I have been able to replicate this problem on OSX ( 3.9-rc4 ) and Ubuntu ( 3.7.1 )