Peculiar behavior with FILE(REMOVE_RECURSE ...) and junction points
Testing CMake 3.12.1 scripts under Windows 10 using junction points. FILE(REMOVE_RECURSE ${dir}) is called on a directory ${dir} in which a junction point exists (e.g. ${dir}/link is a junction point to ${dir}/../other_dir). The call seems to behave as expected (no output, no errors), but afterwards the directory ${dir} still exists and ${dir}/link is now an empty directory (no longer a junction point!), the directory ${dir}/link pointed to is untouched and all other content of ${dir} has been removed.
Expected behavior is of course that ${dir}/link was entirely removed, ${dir} is entirely removed and the directory ${dir}/link points to remains untouched (as is already the case).
A simple work-around for now is to just call FILE(REMOVE_RECURSE ${dir}) twice in succession, the second call possibly guarded by IF(EXISTS ${dir}).