summaryrefslogtreecommitdiffstats
path: root/Tests/Module/GenerateExportHeader/libstatictest
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2011-07-13 00:13:33 (GMT)
committerStephen Kelly <steveire@gmail.com>2011-08-07 16:33:47 (GMT)
commit30880707c094ac5c0edd85d0857afb6fbae55326 (patch)
tree837b58ac331f34eeefaced63c4c0a71ee59ef69e /Tests/Module/GenerateExportHeader/libstatictest
parent955d5133ab2f8bca5372e81af544cafdafc31994 (diff)
downloadCMake-30880707c094ac5c0edd85d0857afb6fbae55326.zip
CMake-30880707c094ac5c0edd85d0857afb6fbae55326.tar.gz
CMake-30880707c094ac5c0edd85d0857afb6fbae55326.tar.bz2
Add the GenerateExportMacro with unit tests.
Reviewed-by: Marcus D. Hanwell <marcus.hanwell@kitware.com>
Diffstat (limited to 'Tests/Module/GenerateExportHeader/libstatictest')
-rw-r--r--Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt13
1 files changed, 13 insertions, 0 deletions
diff --git a/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt b/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt
new file mode 100644
index 0000000..58b875a
--- /dev/null
+++ b/Tests/Module/GenerateExportHeader/libstatictest/CMakeLists.txt
@@ -0,0 +1,13 @@
+
+macro(static_build_pass Source Message)
+ build_pass("libstatic.h" "libstatic" "libstatic" "${Source}" ${Message})
+endmacro()
+
+macro(static_build_fail Source Message)
+ build_fail("libstatic.h" "libstatic" "libstatic" "${Source}" ${Message})
+endmacro()
+
+static_build_pass("Libstatic l; return l.libstatic_exported();" "Failed to build exported.")
+
+static_build_fail("Libstatic l; return l.libstatic_deprecated();" "Built use of deprecated class method. This should not be possible.")
+static_build_fail("libstatic_deprecated();" "Built use of deprecated function. This should not be possible.")