if: Add "TEST <test>" condition

if(TEST TestNameThatExists) will return true if a test with the name
TestNameThatExists has been added with add_test.  The syntax is similar
to if(TARGET TargetName).  Since use of "TEST" as an argument to if()
could previously be interpreted as a non-keyword argument, add policy
CMP0064 to treat it as a keyword as NEW behavior.
This commit is contained in:
Matt McCormick
2014-12-29 20:47:48 -05:00
committed by Brad King
parent 623dcc85a4
commit 14e49ed156
18 changed files with 102 additions and 1 deletions
+4
View File
@@ -71,6 +71,10 @@ Possible expressions are:
created by the :command:`add_executable`, :command:`add_library`, or
:command:`add_custom_target` commands.
``if(TEST test-name)``
True if the given name is an existing test name created by the
:command:`add_test` command.
``if(EXISTS path-to-file-or-directory)``
True if the named file or directory exists. Behavior is well-defined
only for full paths.