Add IS_SYMLINK test to if command
This commit is contained in:
parent
a52fd03a2a
commit
7a9f75c1a8
@ -508,6 +508,13 @@ namespace
|
|||||||
cmSystemTools::FileIsDirectory((argP1)->c_str()),
|
cmSystemTools::FileIsDirectory((argP1)->c_str()),
|
||||||
reducible, arg, newArgs, argP1, argP2);
|
reducible, arg, newArgs, argP1, argP2);
|
||||||
}
|
}
|
||||||
|
// does a symlink with this name exist
|
||||||
|
if (*arg == "IS_SYMLINK" && argP1 != newArgs.end())
|
||||||
|
{
|
||||||
|
HandlePredicate(
|
||||||
|
cmSystemTools::FileIsSymlink((argP1)->c_str()),
|
||||||
|
reducible, arg, newArgs, argP1, argP2);
|
||||||
|
}
|
||||||
// is the given path an absolute path ?
|
// is the given path an absolute path ?
|
||||||
if (*arg == "IS_ABSOLUTE" && argP1 != newArgs.end())
|
if (*arg == "IS_ABSOLUTE" && argP1 != newArgs.end())
|
||||||
{
|
{
|
||||||
|
@ -150,6 +150,9 @@ public:
|
|||||||
" if(IS_DIRECTORY directory-name)\n"
|
" if(IS_DIRECTORY directory-name)\n"
|
||||||
"True if the given name is a directory. "
|
"True if the given name is a directory. "
|
||||||
"Behavior is well-defined only for full paths.\n"
|
"Behavior is well-defined only for full paths.\n"
|
||||||
|
" if(IS_SYMLINK file-name)\n"
|
||||||
|
"True if the given name is a symbolic link. "
|
||||||
|
"Behavior is well-defined only for full paths.\n"
|
||||||
" if(IS_ABSOLUTE path)\n"
|
" if(IS_ABSOLUTE path)\n"
|
||||||
"True if the given path is an absolute path.\n"
|
"True if the given path is an absolute path.\n"
|
||||||
" if(variable MATCHES regex)\n"
|
" if(variable MATCHES regex)\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user