diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-07-13 21:14:41 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-07-15 18:57:33 (GMT) |
commit | 9dbba1b46421d4c45f7090f4573df6e73afccf69 (patch) | |
tree | b4c6a0985d675a6e1e0fd4123608e5a6a36ae235 /Tests/Properties | |
parent | 37340687a4d779320d7778cb62fdfd384fa32f9a (diff) | |
download | CMake-9dbba1b46421d4c45f7090f4573df6e73afccf69.zip CMake-9dbba1b46421d4c45f7090f4573df6e73afccf69.tar.gz CMake-9dbba1b46421d4c45f7090f4573df6e73afccf69.tar.bz2 |
Fix #12342: Add APPEND_STRING option to set_property()
set_property() has APPEND, which creates a list. E.g. when
appending to COMPILE_FLAGS a string is needed, not a list.
With the APPEND_STRING option the value is append as string,
not as list.
Alex
Diffstat (limited to 'Tests/Properties')
-rw-r--r-- | Tests/Properties/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index e0c7522..c1bc3b9 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -71,6 +71,24 @@ if (NOT TARGETRESULT) "Error: target result is TARGETRESULT=${TARGETRESULT}") endif (NOT TARGETRESULT) +# test APPEND and APPEND_STRING set_property() +set_property(TARGET Properties PROPERTY FOO foo) +set_property(TARGET Properties PROPERTY BAR bar) +set_property(TARGET Properties APPEND PROPERTY FOO 123) +set_property(TARGET Properties APPEND_STRING PROPERTY BAR 456) + +get_property(APPEND_RESULT TARGET Properties PROPERTY FOO) +if (NOT "${APPEND_RESULT}" STREQUAL "foo;123") + message(SEND_ERROR + "Error: target result is APPEND_RESULT=${APPEND_RESULT}") +endif () + +get_property(APPEND_STRING_RESULT TARGET Properties PROPERTY BAR) +if (NOT "${APPEND_STRING_RESULT}" STREQUAL "bar456") + message(SEND_ERROR + "Error: target result is APPEND_STRING_RESULT=${APPEND_STRING_RESULT}") +endif () + # test get_property SET get_property(TARGETRESULT TARGET Properties PROPERTY TARGETTEST SET) if (NOT TARGETRESULT) |