diff options
author | Brad King <brad.king@kitware.com> | 2015-08-03 13:25:10 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2015-08-03 13:25:10 (GMT) |
commit | 7ac2b1256b09044b86c6bd926cc239133beab088 (patch) | |
tree | b45456f41ea1885955795ce3c65c6b29ce502884 /Help | |
parent | 94d53d1664b1e792e8088880cfd206e8e81ff625 (diff) | |
parent | 14e49ed15615e7f2bcb58aa4540683250006f5c7 (diff) | |
download | CMake-7ac2b1256b09044b86c6bd926cc239133beab088.zip CMake-7ac2b1256b09044b86c6bd926cc239133beab088.tar.gz CMake-7ac2b1256b09044b86c6bd926cc239133beab088.tar.bz2 |
Merge topic 'if-test'
14e49ed1 if: Add "TEST <test>" condition
623dcc85 ExternalProject: Avoid if() auto-dereference of a "TEST" variable
Diffstat (limited to 'Help')
-rw-r--r-- | Help/command/if.rst | 4 | ||||
-rw-r--r-- | Help/manual/cmake-policies.7.rst | 1 | ||||
-rw-r--r-- | Help/policy/CMP0064.rst | 17 | ||||
-rw-r--r-- | Help/release/dev/if-TEST.rst | 5 |
4 files changed, 27 insertions, 0 deletions
diff --git a/Help/command/if.rst b/Help/command/if.rst index 396becf..2465bde 100644 --- a/Help/command/if.rst +++ b/Help/command/if.rst @@ -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. diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst index 0a313cd..590f10d 100644 --- a/Help/manual/cmake-policies.7.rst +++ b/Help/manual/cmake-policies.7.rst @@ -121,3 +121,4 @@ All Policies /policy/CMP0061 /policy/CMP0062 /policy/CMP0063 + /policy/CMP0064 diff --git a/Help/policy/CMP0064.rst b/Help/policy/CMP0064.rst new file mode 100644 index 0000000..e9a061b --- /dev/null +++ b/Help/policy/CMP0064.rst @@ -0,0 +1,17 @@ +CMP0064 +------- + +Recognize ``TEST`` as a operator for the :command:`if` command. + +The ``TEST`` operator was added to the :command:`if` command to determine if a +given test name was created by the :command:`add_test` command. + +The ``OLD`` behavior for this policy is to ignore the ``TEST`` operator. +The ``NEW`` behavior is to interpret the ``TEST`` operator. + +This policy was introduced in CMake version 3.4. CMake version +|release| warns when the policy is not set and uses ``OLD`` behavior. Use +the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW`` +explicitly. + +.. include:: DEPRECATED.txt diff --git a/Help/release/dev/if-TEST.rst b/Help/release/dev/if-TEST.rst new file mode 100644 index 0000000..05bf71c --- /dev/null +++ b/Help/release/dev/if-TEST.rst @@ -0,0 +1,5 @@ +if-TEST +------- + +* Add a new TEST operator to if() that evaluates to true + if a given test name has been defined. |