summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMP0102/CMP0102-WARN.cmake
blob: e9a45f1a20c6815c6c1993267475085e163b7544 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

set(CMAKE_POLICY_WARNING_CMP0102 1)

include (CMP0102-Common.cmake)
get_property(is_type_set CACHE CMP0102_TEST_VARIABLE
  PROPERTY TYPE SET)
if (NOT is_type_set)
  message(FATAL_ERROR
    "There is a cache entry for an undefined variable after "
    "`mark_as_advanced`.")
endif ()
get_property(type CACHE CMP0102_TEST_VARIABLE
  PROPERTY TYPE)
if (NOT type STREQUAL "UNINITIALIZED")
  message(FATAL_ERROR
    "The cache type for CMP0102_TEST_VARIABLE is not "
    "UNINITIALIZED")
endif ()