diff options
author | Brad King <brad.king@kitware.com> | 2009-07-29 12:39:50 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-07-29 12:39:50 (GMT) |
commit | 819b0742c6ea8d23b388d1ba9bf786d52b92c5cc (patch) | |
tree | 46dac17025f7d01a7c6ed44f0044767cb14dc73d /Tests/Properties | |
parent | 797f91bc0b1249db12d0a4b6891c153035818460 (diff) | |
download | CMake-819b0742c6ea8d23b388d1ba9bf786d52b92c5cc.zip CMake-819b0742c6ea8d23b388d1ba9bf786d52b92c5cc.tar.gz CMake-819b0742c6ea8d23b388d1ba9bf786d52b92c5cc.tar.bz2 |
Test cache entry property "STRINGS"
The STRINGS property tells cmake-gui to create a drop-down selection
list. This teaches the Properties test to set and verify its value.
Diffstat (limited to 'Tests/Properties')
-rw-r--r-- | Tests/Properties/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index 6f3b539..e0c7522 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -100,7 +100,7 @@ endif(NOT RESULT4) # test CACHE properties macro(check_cache_props) - foreach(prop VALUE TYPE HELPSTRING ADVANCED) + foreach(prop VALUE TYPE HELPSTRING ADVANCED STRINGS) get_property(result CACHE SOME_ENTRY PROPERTY ${prop}) if(NOT "x${result}" STREQUAL "x${expect_${prop}}") message(SEND_ERROR "CACHE property ${prop} is [${result}], not [${expect_${prop}}]") @@ -111,15 +111,19 @@ set(expect_VALUE "ON") set(expect_TYPE "BOOL") set(expect_HELPSTRING "sample cache entry") set(expect_ADVANCED 0) +set(expect_STRINGS "") set(SOME_ENTRY "${expect_VALUE}" CACHE ${expect_TYPE} "${expect_HELPSTRING}" FORCE) mark_as_advanced(CLEAR SOME_ENTRY) +set_property(CACHE SOME_ENTRY PROPERTY STRINGS "") check_cache_props() set(expect_VALUE "Some string") set(expect_TYPE "STRING") set(expect_HELPSTRING "sample cache entry help") set(expect_ADVANCED 1) +set(expect_STRINGS "Some string;Some other string;Some third string") set_property(CACHE SOME_ENTRY PROPERTY TYPE "${expect_TYPE}") set_property(CACHE SOME_ENTRY PROPERTY HELPSTRING "${expect_HELPSTRING}") set_property(CACHE SOME_ENTRY PROPERTY VALUE "${expect_VALUE}") set_property(CACHE SOME_ENTRY PROPERTY ADVANCED "${expect_ADVANCED}") +set_property(CACHE SOME_ENTRY PROPERTY STRINGS "${expect_STRINGS}") check_cache_props() |