summaryrefslogtreecommitdiffstats
path: root/Help/policy
diff options
context:
space:
mode:
Diffstat (limited to 'Help/policy')
-rw-r--r--Help/policy/CMP0026.rst2
-rw-r--r--Help/policy/CMP0054.rst16
2 files changed, 11 insertions, 7 deletions
diff --git a/Help/policy/CMP0026.rst b/Help/policy/CMP0026.rst
index 177b655..4889249 100644
--- a/Help/policy/CMP0026.rst
+++ b/Help/policy/CMP0026.rst
@@ -1,7 +1,7 @@
CMP0026
-------
-Disallow use of the LOCATION target property.
+Disallow use of the LOCATION property for build targets.
CMake 2.8.12 and lower allowed reading the LOCATION target
property (and configuration-specific variants) to
diff --git a/Help/policy/CMP0054.rst b/Help/policy/CMP0054.rst
index 39f0c40..3754fda 100644
--- a/Help/policy/CMP0054.rst
+++ b/Help/policy/CMP0054.rst
@@ -16,29 +16,33 @@ Given the following partial example:
::
- set(MONKEY 1)
- set(ANIMAL MONKEY)
+ set(A E)
+ set(E "")
- if("${ANIMAL}" STREQUAL "MONKEY")
+ if("${A}" STREQUAL "")
+ message("Result is TRUE before CMake 3.1 or when CMP0054 is OLD")
+ else()
+ message("Result is FALSE in CMake 3.1 and above if CMP0054 is NEW")
+ endif()
After explicit expansion of variables this gives:
::
- if("MONKEY" STREQUAL "MONKEY")
+ if("E" STREQUAL "")
With the policy set to ``OLD`` implicit expansion reduces this semantically to:
::
- if("1" STREQUAL "1")
+ if("" STREQUAL "")
With the policy set to ``NEW`` the quoted arguments will not be
further dereferenced:
::
- if("MONKEY" STREQUAL "MONKEY")
+ if("E" STREQUAL "")
This policy was introduced in CMake version 3.1.
CMake version |release| warns when the policy is not set and uses