summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/get_property/source_properties.cmake
blob: 263ffe12350e397cec0e055619e1b49e4630db48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function (check_source_file_property file prop)
  get_source_file_property(gsfp_val "${file}" "${prop}")
  get_property(gp_val
    SOURCE "${file}"
    PROPERTY "${prop}")

  message("get_source_file_property: -->${gsfp_val}<--")
  message("get_property: -->${gp_val}<--")
endfunction ()

set_source_files_properties(file.c PROPERTIES empty "" custom value)

check_source_file_property(file.c empty)
check_source_file_property(file.c custom)
check_source_file_property(file.c noexist)