summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/list/GET-CMP0007-WARN.cmake')
-rw-r--r--Tests/RunCMake/list/GET-CMP0007-WARN.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/list/GET-CMP0007-WARN.cmake b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
new file mode 100644
index 0000000..833f352
--- /dev/null
+++ b/Tests/RunCMake/list/GET-CMP0007-WARN.cmake
@@ -0,0 +1,7 @@
+cmake_policy(VERSION 2.4)
+set(thelist "" NEW OLD)
+
+list(GET thelist 1 thevalue)
+if (NOT thevalue STREQUAL "OLD")
+ message(SEND_ERROR "returned element '${thevalue}', but expected 'OLD'")
+endif()