summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt12
-rw-r--r--Tests/RunCMake/CMP0054/CMP0054-WARN.cmake2
-rw-r--r--Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt13
-rw-r--r--Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake2
4 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
index 3d875ae..3cfa5d2 100644
--- a/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0054/CMP0054-WARN-stderr.txt
@@ -9,3 +9,15 @@ CMake Warning \(dev\) at CMP0054-WARN.cmake:3 \(if\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at CMP0054-WARN.cmake:5 \(elseif\):
+ Policy CMP0054 is not set: Only interpret if\(\) arguments as variables or
+ keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ Quoted variables like "FOO" will no longer be dereferenced when the policy
+ is set to NEW. Since the policy is not set the OLD behavior will be used.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake b/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
index 37855fc..a608929 100644
--- a/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
+++ b/Tests/RunCMake/CMP0054/CMP0054-WARN.cmake
@@ -2,4 +2,6 @@ set(FOO "BAR")
if(NOT "FOO" STREQUAL "BAR")
message(FATAL_ERROR "The given literals should match")
+elseif("FOO" STREQUAL "BING")
+ message(FATAL_ERROR "The given literals should not match")
endif()
diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt
index b1ebd49..5a8c263 100644
--- a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt
+++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN-stderr.txt
@@ -10,3 +10,16 @@ CMake Warning \(dev\) at CMP0054-keywords-WARN.cmake:1 \(if\):
Call Stack \(most recent call first\):
CMakeLists.txt:3 \(include\)
This warning is for project developers. Use -Wno-dev to suppress it.
++
+CMake Warning \(dev\) at CMP0054-keywords-WARN.cmake:3 \(elseif\):
+ Policy CMP0054 is not set: Only interpret if\(\) arguments as variables or
+ keywords when unquoted. Run "cmake --help-policy CMP0054" for policy
+ details. Use the cmake_policy command to set the policy and suppress this
+ warning.
+
+ Quoted keywords like "DEFINED" will no longer be interpreted as keywords
+ when the policy is set to NEW. Since the policy is not set the OLD
+ behavior will be used.
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
+This warning is for project developers. Use -Wno-dev to suppress it.
diff --git a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake
index ee0a623..118ab3d 100644
--- a/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake
+++ b/Tests/RunCMake/CMP0054/CMP0054-keywords-WARN.cmake
@@ -1,3 +1,5 @@
if("NOT" 1)
message(FATAL_ERROR "[\"NOT\" 1] evaluated true")
+elseif("DEFINED" NotDefined)
+ message(FATAL_ERROR "[\"DEFINED\" NotDefined] evaluated true")
endif()