summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/get_property/directory_properties.cmake
blob: b0a9b1b6d6978a2035197e62319f204ed3f739c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function (check_directory_property dir prop)
  get_directory_property(gdp_val DIRECTORY "${dir}" "${prop}")
  get_property(gp_val
    DIRECTORY "${dir}"
    PROPERTY "${prop}")

  message("get_directory_property: -->${gdp_val}<--")
  message("get_property: -->${gp_val}<--")
endfunction ()

set_directory_properties(PROPERTIES empty "" custom value)

check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" empty)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" custom)
check_directory_property("${CMAKE_CURRENT_SOURCE_DIR}" noexist)