![]() ![]() if( STRGREATER_EQUAL ) True if the given string or variable’s value is lexicographically greater Than or equal to the string or variable on the right. if( STRLESS_EQUAL ) True if the given string or variable’s value is lexicographically less if( STREQUAL ) True if the given string or variable’s value is lexicographically equal Than the string or variable on the right. if( STRGREATER ) True if the given string or variable’s value is lexicographically greater ![]() if( STRLESS ) True if the given string or variable’s value is lexicographically less if( GREATER_EQUAL ) True if the given string or variable’s value is a valid number and greater if( LESS_EQUAL ) True if the given string or variable’s value is a valid number and less if( EQUAL ) True if the given string or variable’s value is a valid number and equal if( GREATER ) True if the given string or variable’s value is a valid number and greater if( LESS ) True if the given string or variable’s value is a valid number and less () groups are captured in CMAKE_MATCH_ variables. See Regex Specification for regex format. if( MATCHES regex) True if the given string or variable’s value matches the given regularĮxpression. if(IS_ABSOLUTE path) True if the given path is an absolute path. if(IS_SYMLINK file-name) True if the given name is a symbolic link. Behavior is well-defined onlyįor full paths. if(IS_DIRECTORY path-to-directory) True if the given name is a directory. This includes the case of passing the same file name forīoth file1 and file2. True, so that any dependent build operations will occur in the event Time stamps are exactly the same, an IS_NEWER_THAN comparison returns Behavior is well-defined only for full paths. if(file1 IS_NEWER_THAN file2) True if file1 is newer than file2 or if one of the two files doesn’tĮxist. if(EXISTS path-to-file-or-directory) True if the named file or directory exists. ![]() ![]() if(TEST test-name) True if the given name is an existing test name created by theĪdd_test() command. Or add_custom_target() command that has already been invoked if(TARGET target-name) True if the given name is an existing logical target name createdīy a call to the add_executable(), add_library(), if(POLICY policy-id) True if the given name is an existing policy (of the form CMP). if(COMMAND command-name) True if the given name is a command, macro or function that can be if( OR ) True if either expression would be considered true individually. if( AND ) True if both expressions would be considered true individually. (Note macro arguments are not variables.) if(NOT ) True if the expression is not true. if() True if given a variable that is defined to a value that is not a falseĬonstant. If the argument is not one of these specificĬonstants, it is treated as a variable or string and the following Named boolean constants areĬase-insensitive. NO, FALSE, N, IGNORE, NOTFOUND, the empty string, Possible expressions are: if() True if the constant is 1, ON, YES, TRUE, Y, Then boolean NOT operators andįinally boolean AND and then OR operators will be evaluated. VERSION_LESS_EQUAL, VERSION_GREATER, VERSION_GREATER_EQUAL,Īnd MATCHES will be evaluated. STRGREATER_EQUAL, VERSION_EQUAL, VERSION_LESS, STREQUAL, STRLESS, STRLESS_EQUAL, STRGREATER, Then any binary tests such asĮQUAL, LESS, LESS_EQUAL, ``GREATER, GREATER_EQUAL, Parenthetical expressionsĪre evaluated first followed by unary tests such as EXISTS,ĬOMMAND, and DEFINED. There is a traditional order of precedence. Note that the expression in theĮlse and endif clause is optional. The elseif and else sections are optional. endif ( expression )Įvaluates the given expression. ![]()
0 Comments
Leave a Reply. |