[CMake] Problem with removing directories containing soft links on MSYS

Volo Zyko volo.zyko at gmail.com
Thu Dec 7 11:36:16 EST 2017


Additionally investigated that the following also fails:

$> test_dir=$PWD/cmake

$> mkdir -p $test_dir/z
$> ln -s $test_dir/z/ $test_dir/a

$> cmake -E remove_directory $test_dir

In this case $test_dir/z is not removed at all.

Also, I checked cmake 3.5.1 and 3.9.2.

 Volo Zyko


On Thu, Dec 7, 2017 at 4:35 PM, Volo Zyko <volo.zyko at gmail.com> wrote:
> The following list of bash commands ends with fail at least on MSYS
> (don't know about Cygwin).
>
> $> test_dir=$PWD/cmake
>
> $> mkdir -p $test_dir/1
> $> ln -s $test_dir/1/ $test_dir/a
>
> $> cmake -E remove_directory $test_dir
>
> Final CMake invocation reports: Error removing directory "C:/cmake".
> It looks like cmake first removes "$test_dir/1" and then cannot remove
> dangling "$test_dir/a". Is this something known?
>
>  Volo Zyko


More information about the CMake mailing list