summaryrefslogtreecommitdiff
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorPetr Kmoch <petr.kmoch@gmail.com>2012-10-03 17:09:09 +0200
committerRolf Eike Beer <eike@sf-mail.de>2012-11-02 17:10:07 +0100
commit828d4f514d04eb522e70173ac1e4f6790fac1460 (patch)
treea37d6e50adab4ccf9c5698c04edc4ac68f34d14b /Tests/CMakeTests
parent82106e3783b8c9a5f21f7ffea336c38b1f13c33f (diff)
downloadcmake-828d4f514d04eb522e70173ac1e4f6790fac1460.tar.gz
Add several get_property() tests
Add tests for some get_property() uses not covered by existing tests.
Diffstat (limited to 'Tests/CMakeTests')
-rw-r--r--Tests/CMakeTests/GetPropertyTest.cmake.in17
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/CMakeTests/GetPropertyTest.cmake.in b/Tests/CMakeTests/GetPropertyTest.cmake.in
index 7d6e013f7b..306ab7269f 100644
--- a/Tests/CMakeTests/GetPropertyTest.cmake.in
+++ b/Tests/CMakeTests/GetPropertyTest.cmake.in
@@ -11,6 +11,23 @@ if (NOT FOO_FULL STREQUAL "NOTFOUND")
message(SEND_ERROR "property FOO has FULL_DOCS set to '${FOO_FULL}'")
endif ()
+get_property(test_brief GLOBAL PROPERTY ENABLED_FEATURES BRIEF_DOCS)
+get_property(test_full GLOBAL PROPERTY ENABLED_FEATURES FULL_DOCS)
+
+if(test_brief STREQUAL "NOTFOUND")
+ message(SEND_ERROR "property ENABLED_FEATURES has no BRIEF_DOCS")
+endif()
+
+if(test_full STREQUAL "NOTFOUND")
+ message(SEND_ERROR "property ENABLED_FEATURES has no FULL_DOCS")
+endif()
+
+set(test_var alpha)
+get_property(result VARIABLE PROPERTY test_var)
+if(NOT result STREQUAL "alpha")
+ message(SEND_ERROR "bad value of VARIABLE PROPERTY test_var: got '${result}' instead of 'alpha'")
+endif()
+
set(Missing-Argument-RESULT 1)
set(Missing-Argument-STDERR ".*CMake Error at (@CMAKE_CURRENT_SOURCE_DIR@/)?GetProperty-Missing-Argument.cmake:1 \\(get_property\\):.*get_property called with incorrect number of arguments.*")