Misleading option for cmake -E remove -f
CMake's command mode supports the
remove operation which in turn has an optional argument
-f. The docs for this option are a bit misleading:
Remove the file(s), use -f to force it. If a file does not exist it will be silently ignored.
Looking at the source code, the
-f option doesn't actually force anything. All it does is affect the return code of the command if the requested file could not be removed. Put simply, it makes the command appear successful even if it fails to remove the file. At the least, the docs should be updated to make this clear, but I'd suggest that the option be removed entirely since its use would be questionable. If anything is calling the command and inspecting the return code, one would presume that the only reason to do so would be to check if the removal was successful.