if(EXISTS path) doesn't expand tilde to $HOME
On Linux (and I suspect other Unix-based systems)
if(EXISTS ~/something-existing) always fails. It seems that the tilde is not expanded and the check is performed for the path
./\~/something-existing with a literal tilde in the path.
I noticed that the same happens for
file(DOWNLOAD's target path and I suspect it happens for other functions (though not all.
include seems to expand it).
Is this the expected behavior? If yes, then I think it should be documented. I couldn't find any docs about that.