`file(LOCK ./lock GUARD FILE)` is broken in script mode
OS: Windows 7 x64
cmake -P ./testfileguard.cmd.cmake
#testfileguard.cmd.cmake
message(11)
file(LOCK ./lock GUARD FILE)
message(22)
file(LOCK ./lock RELEASE)
file(REMOVE ./lock)
message(33)
Prints only 11
.
Tested in: 3.14.0-rc3
, 3.14.0-rc2
, 3.13.2
, 3.12.3
, 3.11.2
, 3.10.0-rc3
, 3.9.1
.
So that seems broken a long time ago (nobody uses locks huh?).
Documentation for the file(LOCK ...
does not have any description about the script mode issues.
If try to remove GUARD FILE
or replace by GUARD PROCESS
- works as expected.
Edited by Andrey