Segmentation fault when using file(LOCK GUARD FILE) by script mode
Consider a lock.cmake
file with following contents
file(LOCK ${file} GUARD FILE TIMEOUT ${timeout} RESULT_VARIABLE var)
When I try to run this script with CMake commandline, segmentation fault occurs
> cmake -Dfile=<path>/foo.lock -Dtimeout=300 -P lock.cmake
[1] 64037 segmentation fault cmake -P lock.cmake
Also happens when specified a directory instead of a file, and passed DIRECTORY
.
-
macOS 10.15.7 (macbook pro 2019)
- CMake version: 3.25.2
- Message:
[1] 64037 segmentation fault cmake -P lock.cmake
-
Ubuntu 18.04.5 LTS
- CMake version 3.20.2
- Message:
[1] 9529 segmentation fault (core dumped) cmake -Dfile=<path>/foo.lock -Dtimeout=300 -P lock.cmake
Edited by YongGyu Lee