summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake')
-rw-r--r--Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
new file mode 100644
index 0000000..5594be8
--- /dev/null
+++ b/Tests/RunCMake/CMP0121/CMP0121-ERANGE-Common.cmake
@@ -0,0 +1,8 @@
+set(listvar a b c d e)
+
+list(GET listvar
+ 18446744073709551616 # 2^64
+ 2147483648 # 2^31
+ 4294967296 # 2^32; errors out-of-range as -2147483643 due to underflow
+ out)
+message("ERANGE: -->${out}<--")