summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/option/CMP0077-OLD.cmake
blob: 4c52d4b922d28f6c824f621a5d7b5fb4d9c76069 (plain)
1
2
3
4
5
6
7
8
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()