diff options
Diffstat (limited to 'Tests/RunCMake/get_property/test_properties.cmake')
-rw-r--r-- | Tests/RunCMake/get_property/test_properties.cmake | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Tests/RunCMake/get_property/test_properties.cmake b/Tests/RunCMake/get_property/test_properties.cmake index 1d0295c..f1cbca4 100644 --- a/Tests/RunCMake/get_property/test_properties.cmake +++ b/Tests/RunCMake/get_property/test_properties.cmake @@ -1,7 +1,11 @@ -function (check_test_property test prop) - get_test_property("${test}" "${prop}" gtp_val) +function (check_test_property test prop dir) + set(dir_args) + if(dir) + set(dir_args DIRECTORY ${dir}) + endif() + get_test_property("${test}" "${prop}" ${dir_args} gtp_val) get_property(gp_val - TEST "${test}" + TEST "${test}" ${dir_args} PROPERTY "${prop}") message("get_test_property: -->${gtp_val}<--") @@ -11,7 +15,10 @@ endfunction () include(CTest) add_test(NAME test COMMAND "${CMAKE_COMMAND}" --help) set_tests_properties(test PROPERTIES empty "" custom value) +add_subdirectory(test_properties) -check_test_property(test empty) -check_test_property(test custom) -check_test_property(test noexist) +check_test_property(test empty "") +check_test_property(test custom "") +check_test_property(test noexist "") +check_test_property(test custom test_properties) +check_test_property(test custom ${CMAKE_BINARY_DIR}/test_properties) |