summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/option/CMP0077-OLD.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/option/CMP0077-OLD.cmake')
-rw-r--r--Tests/RunCMake/option/CMP0077-OLD.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/option/CMP0077-OLD.cmake b/Tests/RunCMake/option/CMP0077-OLD.cmake
new file mode 100644
index 0000000..4c52d4b
--- /dev/null
+++ b/Tests/RunCMake/option/CMP0077-OLD.cmake
@@ -0,0 +1,9 @@
+
+#Verify that option overwrites existing normal variable when the policy
+#is set to OLD
+cmake_policy(SET CMP0077 OLD)
+set(OPT_LOCAL_VAR FALSE)
+option(OPT_LOCAL_VAR "TEST_VAR" ON)
+if(NOT OPT_LOCAL_VAR)
+ message(FATAL_ERROR "option failed to overwrite existing normal variable")
+endif()