summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeTests
diff options
context:
space:
mode:
authorPetr Kmoch <petr.kmoch@gmail.com>2012-10-03 15:09:09 (GMT)
committerRolf Eike Beer <eike@sf-mail.de>2012-11-02 16:10:07 (GMT)
commit828d4f514d04eb522e70173ac1e4f6790fac1460 (patch)
treea37d6e50adab4ccf9c5698c04edc4ac68f34d14b /Tests/CMakeTests
parent82106e3783b8c9a5f21f7ffea336c38b1f13c33f (diff)
downloadCMake-828d4f514d04eb522e70173ac1e4f6790fac1460.zip
CMake-828d4f514d04eb522e70173ac1e4f6790fac1460.tar.gz
CMake-828d4f514d04eb522e70173ac1e4f6790fac1460.tar.bz2
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 7d6e013..306ab72 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.*")